This topic has been permanently closed and transferred to MATLAB Answers.

General
Follow


Riccardo Spartà
10 views (last 30 days)

HiL simulation using Simulink but without a Speedgoat® target machine

Riccardo Spartà on 13 Nov 2023
Latest activity Edit by Walter Roberson on 14 Nov 2023

Hi everyone,
I would like to ask you if it would be possible to do an HiL simulation using an environment model simulated via Simulink and load in a target computer connected to the hardware needed. The target computer will be simply a laptop with Matlab&Simulink package installed and directly connected to the bench to test.
I have found some solutions about the use of Simulink Real-Time but it implies the use of a Speedgoat unit, so I was wondering if anyone has ever done it without that device.
Thank you very much.
Walter Roberson
Walter Roberson on 13 Nov 2023
You can do it if you use a sufficiently old version of MATLAB. Somewhere approximately R2017b Simulink Real-Time switched to supporting only speedgoat.
However, the controlling computer would have to be running one of the few real-time operating systems that were supported back then. RDOS or something like that (I do not recall whether QNX was supported then... I don't think so).
And there were always a fairly restricted set of supported hardware devices. I seem to recall that only a small number of different ethernet controllers were supported, and it is quite unlikely that your current laptop is using one of those controllers, so if you needed ethernet you would have to create custom drivers. Without any support as the non-Speedgoat versions of Simulink Real-Time have aged out of support.
Basically, you cannot hope to take a Windows machine and run it as a "hard real-time" system -- not unless you have contacts with the US Navy and manage to snag a copy of the real-time version of Windows NT that is used to control battleships. If "soft real-time" is good enough for your purposes, then recently Windows 10 Enterprise added some facilities: https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/soft-real-time/soft-real-time
If I understand correctly, there are some real-time Linux distributions; I do not know how up-to-date they are kept.
Riccardo Spartà
Riccardo Spartà on 14 Nov 2023
Thank you very much for your time and availability, you have been clear. I think that for my application, a Master Thesis Project regarding Hardware in the Loop Simulation for Small Satellites , the "soft real time" solution could be adequate, do you agree?
So the main idea is to generate code from the environment model in Simulink and load that code in the RTOS chosen, Windows or Linux, and then, with the hardware connected to that computer, run the simulation via the Real Time System. Did I understand correctly?
Thank you again.
Walter Roberson
Walter Roberson on 14 Nov 2023 (Edited on 14 Nov 2023)
Windows 10 Home and Windows 10 Pro do not have the necessary facilities for soft real-time. You would need Windows 10 Enterprise, which is a commecial product from Microsoft. Beyond a 90 day trial, you would need to be registered as a business with Microsoft, with a minimum of 5 "seats". The least expensive configuration I ever found cost roughly $US2500 per year with a 2 year minimum.

See Also