Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Controller Structure that involves derivation and integration of a signal

Hi;

I am trying to implement a controller for a remotely operated underwater vehicle for an academic research. This controller receives the desired position and velocity values from the trajectory generator and generates error values with the position and velocity feedback coming from the relevant sensors at  20 Hz. My LabVIEW controller block receives this error signal and carries out some derivation and integration calculations on this signal. To implement my controller, first, I used Control&Simulation loop with the continuous integration and derivation blocks. However, my first attempt with this structure failed. Then I realized that my error signal is fairly noisy so I implemented a first order filter before the derivative and integral blocks but my controller failed once again. Given this I am wondering whether or not using the Control&Simulation loop with the continuous integration and derivation blocks is the correct way of implementing an effective controller given the existence of somewhat noisy error data. if not what derivative and integration block shall I use to minimize the effect of noise on the controller behaviour? Is pointbypoint derivative and integration in a while loop structure better way of coding a controller than using the Control&Simulation loop with the continous derivative and integral blocks?

Kind Regards

0 Kudos
Message 1 of 2
(3,230 Views)

Hey SerdarSoylu,

 

You can use the CD&Sim tools outside of the simulation loop. It will automatically create a while loop and shift registers for you for the integration. However, I would suggest using the PID toolkit since you are not really simulating any signal, just implementing a controller. You can take the Discrete Transfer function from the CD&Sim and define the PID transfer function and implement the control that way in a while loop. 

 

Also, if you insist on using CD&Sim, you need to make sure that it is synchronized with your system clock so that it ouptuts relevant data.

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(3,217 Views)