From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

close-loop control system simulation using CompactRIO Reat-Time Controller and chassis

We built a control system simulation platform using cRIO-9104, and cRIO-9004. All the system is built with LabVIEW. 

 

The whole system is composed of two parts: helicopter nonlinear model, and controller. The two parts worked perfectly together in LabVIEW environment. 

 

But, when I seperate them to cRIO-9004 and cRIO-9104, The system can't get expected performance. In this case: the helicopter nonlinear model is running in cRIO-9004, while the controller is designed in FPGA part of cRIO-9104. 

 

Attatchments are my labview files. the first one is the zipped project, the second one is the controller and the nonlinear modle that run together. 

 

 

Download All
0 Kudos
Message 1 of 6
(4,643 Views)

I don't have time to open and inspect your code ... sorry.

 

1. You say a simulator, are you using CD&SIM simulation loop ? Maybe not as (I think) the CD&SIM can't run on FPGA.

2. In the LabVIEW environment when they worked perfectly - were they running on same processor/PC ? Did you have them running in real-time, i.e. one second of simulated time was one second of real-time ?

 

If you simulate models on different processors they both have to be running in real-time (or some common multiple of real-time), so that they can stay synchronised.

 

3. Did you make sure the sample rates of your systems (if discrete - assuming not CD&SIM) were preserved as you moved from the LabVIEW environment to the cRIO/FPGA combination

4. Is the way they pass data from system to the other preserved - sample rates, scalings, signal type - or any changes accommodated.

 

Hope this helps you think about where the issue might be.

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 2 of 6
(4,636 Views)

Just seen your other message asking for examples how to make a control system.

 

It sounds like you may need to get on some training courses to understand the basics before trying to run a nonlinear simulation split across two different processors one LV RT and one LV FPGA. There are many built in examples that ship with LV for LV RT and LV FPGA, but start with the basics first. The CompactRIO developers guide is very good.

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 3 of 6
(4,633 Views)

what do you mean by "The system can't get expected performance."  performance can mean many things

Stu
0 Kudos
Message 4 of 6
(4,607 Views)

"The system doesn't perform well" means the actual position of helicopter can't reach its desired one. But it can reach desired position when the two parts of system run together in the LabVIEW envirionment. Can anyone here could help me check my projects and see if there any problem? Or if it is right to do simulation like this?

0 Kudos
Message 5 of 6
(4,592 Views)
These questions are difficult to answer without fully understanding your application. What is different between the real and simulated systems? Can you identify a particular piece of code that may be causing the discrepancy?
0 Kudos
Message 6 of 6
(4,562 Views)