Dear all,
I'm designing a Simulink model to simulate the dynamics of a vehicle. My model is composed by a system "VehicleDynamics" which contains two referenced models "WheelDynamics" (4 instances) and "LocalController" (4 instances). The model "WheelDynamics" include a continuous-time state, while the model "LocalController" just include some gains and switches, but it takes the wheel speed as an input signal and it generates a continuous-time output. My model "VehicleDynamics" runs in normal mode, the model "WheelDynmaicsFL" (FL stands for front-left) runs also in Normal mode, while the other three instances "WheelDynmaicsXX" (where XX is FR,RL,RR) run in Accelerator mode. The same is for the four instances of "LocalControllerXX": "LocalControllerFL" runs in Normal Mode, while the other three instances of the same model runs in Accelerator mode. Until here, everything works fine as long as I use a variable-step solver. If I use a fixed-step solver (like for example ode3 (Bogacki-Shampine)), I get this error:
"The Model block cannot inherit a continuous sample time. Output port 1 of Model block 'SingleWheelTEST/LocalCtrlFL' cannot accept 'continuous' sample time."
To get a better understanding of the system, I made a model with just one instance of "WheelDynamics" and "LocalController" that run in Normal mode. With the fixed step solver I still experience the same error, while with the variable-step solver everything goes smooth, and I cannot understand why!
I already tried to configure all the models in question "SingleWheelTEST", "WheelDynamics" and "LocalController" to use a Fixed-Step solver, but it didn't worked out.
Fianlly, having 4 instances of "WheelDynamics" and "LocalController", it seems that I'm constrainted to use Accelerator mode on 3 of the instances. However, I don't want to use them because Simulink generates code in the working folder that put additional files that I will never open (it creates like a "slprj" foldes and several .mexw32 files that I don't want). Is it possible to use all in Normal mode instead?
The Matlab version I'm using is the 2009a.
Thanks,
Ubaldo
Best Answer