Examples of use of the machine real-time (MATLAB, Simulink, Software-hardware simulator)

Good day, dear Followers!
In my practice, I often encounter the situation when I mention in conversation of some "machine real time" in the eyes of the interlocutor slips a million associations, unfortunately, are not related to the topic of conversation.
In the first article I want to shed some light on this topic with such unusual sounding for the Russian-speaking engineering audience name.



Anyone interested in running the control algorithms and physical models in the form of models of Simulink - in hard real-time with a minimum of effort — I ask under kat!
Attention, many images!



So, a brief definition:

the
    the
  • Machine real-time is a computer which is designed to perform a wide range of issues in the real-time.

Explanation of a brief definition:

the
    the
  • a Wide range of tasks entails some flexibility and redundancy in software and hardware component. The majority of these PC (industrial computer, not to be confused with personal) have a rich set of input / output interface cards and drivers for them.
  • the
  • the Requirement to work in real time translates into the fact that this PC must be running an operating system real-time. There are exceptions to this rule, the free account has not been canceled.

There are exceptions — there are composite simulation of multiple machines, and circuit boards without input / output, and not industrial performance, and soft real-time. But, again, often is IBM compatible PC with the hardware and ProgramName components, allowing it to run with hard real-time.

In Russian literature and use common terms hardware simulator and - loop simulation. From my point of view, they are not complete. Because the "simulation models" — not a single function of this device.

The list of producers of such decisions is quite extensive. I will accept for consideration articles from Speedgoat, with whom I have enjoyed pretty tight to work.

Below based on examples, I will try to reveal the essence of the use of these machines.

Example 1

Team of engineers involved in development of electric drive. There are model in the Simulink, which is a subsystem of the Controller (control system) was developed by the engineer for the control systems, as a subsystem of the Plant (model engine) — engineer physical modeling.

Objective: Hardware prototype of the controller yet, and it is not clear when it will be. Prototype engine either, or it is terrible to be connected to while it is still damp the control system.

Solution: to Use the machine for real-time rapid prototyping of the control system. And another car, but more productive, to run a physical model of the engine in real time. Interfaces between the machines can and should be the same as between the real motor and the controller. This ligament is called HIL — Hardware-In-The-Loop. Simple — hardware and software simulation. It allows on early stages to integrate and test the control algorithms in conjunction with the model of the control object in real-time taking into account the influence of the transmission medium between devices.
The illustration below shows a diagram of the process. Machine real-time control system can be rugged for subsequent placement in the field. Machine for the physical model requires more productive — on the right. Transferring the algorithm and the models in the real world is made a single click and can be album looks like an engineer without the help of a programmer and without a deep understanding the nuances RTOS.



Example 2

All the same team. There was a prototype engine, prototype controller still in development.

Objective: you Must test the control system on the real control object.

Solution: management System has already been tested on the model of the engine at work on a PC. Then more fully in the HIL mode. Now, when there is a real prototype — it is not so scary to run. Because most errors are already caught and it is only necessary to validate the system.

This is also the case when the control object has been from the beginning. Then a rapid transition from the model of the control system to a working piece of iron can be called a Rapid Prototyping or Rapid Prototyping.



Example 3

Again, a familiar team. Got the first sample of the controller.

Objective: you Must connect first sample to may mnogokratnogo engine

Solution: , for security reasons, it is not hot, but first run a couple of tests using the engine model on the machine real time. It would be pure Plant Simulation or Simulation Control Object.

Can and a model airplane on the machine real time to run. In aviation, simulation is often fondly referred to "e-bird".

By the way, the firmware of the controller must be generated necessarily from the same model, which was run on the machine real-time in the previous examples. The only way we will provide end-to-end traceability. Rewriting the firmware again fraught with making mistakes and driving off the previous stages.

Below an illustration describing the essence of the problem solution and video workflow with Siemens PLC controller and real-time machine as a control object.




Siemens PLC + Speedgoat real-time machine

Example 4

The final stage of development.

Objective: Need to spend 100500 tests on a real drive and document the results in the shortest time.

Solution: Machine real-time can be a heart test bench to generate test scripts and log the required parameters. In MATLAB, you can create non-linear test script that can automatically adjust depending on the results obtained. The documentation generator will help you to generate a report in the required format automatically.



As can be seen from the examples, the same machine can be priispolzovanii in various use cases. But to fully unify these devices is impossible — there is a kind of distribution functionality. Line of Speedgoat, for example, has next:



The educational version is an immeasurable joy for any laboratory at a technical University.
With this in the lab can be for a fixed period of certification, for example, to have time to do much more advanced project.

Car real time from Speedgoat is inside the robot Cheetah from MIT:


And twice I was taken to Naberezhnye Chelny at the Department of control systems of the branch of KFU.

I still have the brainchild in more detail to address the following questions.
Namely:
the
    the
  • code Generation C/C++/Verilog/VHDL
  • the
  • Hardware, circuit Board input / output
  • the
  • Software environment, RTOS, BIOS
  • the
  • Debug in real time (External mode)

This should vylitsya in the following article. I really want to listen to the review questions and possible wishes.
In August I plan to hold a technical webinar on the subject. The invitation will be posted on the website matlab.ru. I would be very glad if the participants are abrowser with interesting questions!

Thank you for reading!
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

When the basin is small, or it's time to choose VPS server

Performance comparison of hierarchical models, Django and PostgreSQL

From Tomsk to Silicon Valley and Back