Changing sample time, Ts of the examples under Simulink support package for parrot minidrones

조회 수: 2 (최근 30일)
Hello everyone,
I am trying to get the sensor values at a particular time for the Parrot Mambo Fly minidrone. Simulink model: Code generation template.
I want to change the sample time Ts = 0.005 sec to Ts = 5.00 sec. I tried providing sample time as 5 sec in the solver but then error occurs
According to what i understood from the flight log after the simulation is that counter(returns the sensor values like pressure, altitude, acc.) occurs every second with a frequency of 200Hz as Ts is set to 5ms.
But I want the counter to occur every 5 secs.
Would be great if someone could help me here.
thanks :)

답변 (1개)

Nitin Kapgate
Nitin Kapgate 2020년 10월 29일
편집: Nitin Kapgate 2020년 10월 29일
You have changed the fixed-step solver’s step-size (system sample time) to be equal to 5 seconds, but the sample times for the blocks in the model are still 0.005 seconds, which is causing an error.
This error is caused because the sample times of different blocks must be integer multiples of fixed-step solver’s step-size. Otherwise, the simulator might miss key transitions in the state of the system.
You can resolve this error by changing the sample times (which currently are set to 0.005 seconds) for all the blocks in the model to 5 seconds or an integer multiple of 5 seconds.
Refer the documentation to learn more about sample times in systems.

카테고리

Help CenterFile Exchange에서 Parrot Minidrones에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by