0
\$\begingroup\$

I want to generate a pulse in Matlab Simulink fixed point solver.

The step size in the Simulink fixed solver is 1e-06, but I need a pulse width of 2e-08.

The figure shows the clear requirement of the required pulse.

The problem I am facing is that the computed sample time of the pulse is not an integer multiple of the step size. I am looking for an alternative idea for creating the pulse in fixed point solver.

If any one has any idea of creating the pulse, please share them.

enter image description here

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

There is no alternative idea when it comes to fix step. everything must be an integer number of the step.

Your solver is set at 1us yet you want a pulse that is 20ns. You need to reduce you step to at least 20ns to realise such a pulse,

There are three options

  1. Reduce the fix-step to at least 20ns to realise such a pulse
  2. Change to a variable step to realise such a pulse
  3. Re-evaluate whether you need a pulse this narrow being simulated, is the edge good enough?
\$\endgroup\$
0
\$\begingroup\$

If you are simulating at 1e-6 and want to observe something at 1e-8 it does not seem logically possible. So you can try reducing the step size. Otherwise, if you can express the values in terms of duty cycle and frequency from that you can arrive at minimum sample time needed to set the simulation.

Typically before going to fixed step, you need to run model in variable step and then find the smallest step size there using profiler. This can be used for fixed step size.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.