Many combined simulations need to call PSOs and to implement PSO calls in user-defined functions in user custom functions in Simuli / NK.
Call the M files of PSO using the S-Function Template
In SINULINK, through three sine wave analog inputs, use the oscilloscope to see the output, as shown

Where S-function is defined as follows:

The SFUNTEST inside can be modified according to the SFUNTEPL files in MATLAB, and can be changed to the PSO main function in the corresponding position.
For other needs to reference the Slmulink combined simulation can be performed according to the above steps.
Final oscilloscope outputs the result of PSO

Need to write s-function can contact QQ1015502154
1. After we have the relevant settings of Carsim, click "Send to Simulink" as shown in the figure: 2. We have a "simfile.sim" file in our Carsim's database, here is the following f...
Preface: Why do we need to simulate the three together? 1. Prescan can focus on the construction of autonomous driving scenarios (including rich sensors and driving scenarios) 2. Carsim's vehicle dyna...
content problem method problem At the same time installed two and above versions of MATLAB, if you implement Carsim and the specified version of Matlab Joint Simulation, how to operate? method Adminis...
Simulink 1. What is Simulink SimulinkK is an extension of MATLAB software. It is a software package that implements dynamic system modeling and simulation. The main difference between it and MATLAB la...
1. Introduction to Matlab and Simulink operation Note: This article uses the equation of state method to build a 1/4 vehicle model as an example to explain. For the suspension model and parameters, pl...
principle Robot control often adopts PD control and PID control. Its advantage is that the control law is simple and easy to implement without modeling. When ignoring the interference of gravity and e...
Joint Simulation of ADAMS Liquido Arm and MATLAB / SIMULINK (below) The first step. ADAMS mechanical system export 1 Click on the plugin in ADAMS - Adams Controls - Mechanical System Export Note: The ...
Joint Simulation of ADAMS Liquidian Arm and Matlab / Simulink (Part) I wanted to be a joint simulation of six joint robotics and Simulink, but the information on online joint simulation was rare, not ...
Use of simout function combined with simulink in MATLAB The simout function is able to assign the variable of the m file to the variable in simulink, so that if you want to change the parameters, you ...
Press the space bar to automatically zoom to display all fit to view; select a module and press enter to double-click Select some options in "Display- Blocks -Tool tip options", and automati...