Converting simulink analog model

Hi: I have a simulink model of a PID controller and plant. This is a continuous model (s instead of z). (1) Will the continuous model I have, work with an xPC/industrial PC setup coupled to the actual plant hardware, or do I absolutely have to use a digital model ?

In the latter case, is there a simple way to convert this continuous model into a digital one, other than rebuilding it using discrete functions ? Could I, for instance, add a zero-order hold at the input and output of the model to simulate a digital system ?

(2) When I connect the actual plant to the model, I intend to reconnect the plant block in the overall simulink model as an estimator in the feedback loop. Would converting the controller to a digital system have any effect on this analog plant estimator model ? Would I need to add ZOHs at the input and output of this estimator ?

Thanks, Manu

Reply to
Manu Murthy
Loading thread data ...

In Matlab's Control System Toolbox, thete is a "c2d" command to convert continuous transfer functions to discrete ones. You can then use a discrete transfer function block in Simulink to implement this controller.

Bora

Reply to
Bora

If the system you are trying to control is slow enough with respect to the controller (think of a factor 50-100) then in general the analog controller would do fine. A good example is regulation of water heights in large vessels.

For fast systems it makes sense to have a discrete time domain controller. For example the Levitation of a magnetic ball.

Depending on the type of system and controller it can be advisable to also design the controller in the discrete domain. Usually this gives more accurate results as you design the controller while taking the sampling into account.

At least when you are converting to a digital system, remember where to put the sampling elements. If you convert the controller then you put them around the control. If you convert your model then they are around your model. So never do it on both of them as you would have two definitions in your system for the sample and hold. You can find more about this in basic control theory books. A good book: Feedback Control Systems, John van de Vegte, Prentice Hall, 3rd edition. It contains two chapters on transfer to discrete domain and using digital controllers. Mainly it is about continuous time control systems.

Reply to
emiel

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.