08-29-2013 05:27 PM
It looks like you are reading something in the real-world (the Sensor ExpressVI ?), and writing to something in the real-world (Reference Express VI), but you are using waveforms to pass the data around. This might be ok for open loop control - but for feedback control you need to keep updating your control action based on the current error or signal read in - and consequently real world controllers are normally implemented in a point by point scheme. A dynamic 1st order transfer function like you have written can be implemented ina point by point system by turning it into a discrete time transfer function. Your while loops will then need to operate once every Ts seconds - depending what sample rate you select.
You don't need the CD&SIM to do this - as discrete transfer functions can be implemented with simple algebra and feedback nodes (z^-1).
I may have completely misunderstood what you are trying to do ...
When describing a control problem it is always best to describe the whole control loop = controller + actuator + thing you want to control + sensor. So far we only have a small part of picture.
08-31-2013 04:53 AM
Dear Sir,
I understood your point. i tried using the Z-1 function. Is there any example you could suggest which could refer and build my controller.
The loop is pretty simple i am sending a reference signals to actuator, the system response is received and control action is incorporated and fedback to the system.
The controller has a first order transfer function K/s+K*d where K is just a gain and K*d is cutoff (the controller has a low pass characteristic).
I want to send a trigular signal (for a fixed time) in form of N number of samples, and collect the response of these signals.
You will get some idea from my example posted earlier. In that i was not getting any signals out from the inner loop. I think it is due to the reason as you said in the post. the control operation should be done in point by point manner.
I need some outlook so that I can build on it.
Regards
Sachin
08-31-2013 06:54 PM
Why not first make sure you can get control action with a simple scalar gain controller (i.e k), make sure that works point-by-point. Decide on your sample time and make sure that is working correctly. Once you have done that then add in the dynamic part of your controllers - converting from laplace domain (s) to discrete time (z^-1). This conversion just gives and approximation - and there are several approximations - just replace the s with the corresponding transfer function in z^-1 and implement using simple algebra and feedback nodes.