PID a control of a simple plant- Code issue

Translate This Thread From English to

Threaded View


Greetings all,

I am trying to simulate a simple plant by verifying the out of the
plant when controlled with a PID controller The plant is 1/s(s+1). I
converted it in the z-domain. Then, designed a Gc(z) as
9.15*(z-.9802)/(z-.8187).  The closeloop step response of the system
gives satisfactory results. But when  I run it in simulink with my
s-function, I don't get the same results. I tryed looking over every
line of my code, but I am not able to the discrepancy.

I'd appreciate your help, thanks in advace.


Re: PID a control of a simple plant- Code issue




bxa132203 wrote:

Your problem may be , when you discretizing the  continuouse-time PID
controller
to a discrete-time controller, the approximation  is too bigger.

In fact, you have designed a Sampled-data control system where the
continous-time plant controlled by a digital controller, a lots of
paper have pointed out the so called analog design method which you
adopted may a poor method.
So you can design the controller using another method ,and you may be
get the desired result.

Alternative method:
You can adjust the sampling period in the matlab MDL file, perhaps, you
can derive the right result.

Good luck to you !


Re: PID a control of a simple plant- Code issue



bxa132203 wrote:

How did you convert it to the z domain?

What was your result?

What sampling rate are you using?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html

Site Timeline