MATLAB Answers

How to check the outputs of the Incremental Shaft Encoder in Simulink?

61 views (last 30 days)
Ayush Srivastava
Ayush Srivastava on 8 Mar 2020 at 8:12
Commented: Ayush Srivastava on 27 Mar 2020 at 8:08
There is a problem coming in checking the outputs of the incremental shaft encoder in Simulink.

  4 Comments

Show 1 older comment
Ayush Srivastava
Ayush Srivastava on 8 Mar 2020 at 13:31
Actually I have to connect the output of the shaft encoder to the input of the quadrature decoder so, there is a problem coming while connection.
Ameer Hamza
Ameer Hamza on 8 Mar 2020 at 14:32
Are you reading the values from some external hardware? Can you share the simple model which you are trying to run?

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 8 Mar 2020 at 18:36
Since you are using blocks from simscape multibody, which have different signals as compared to normal signals of Simulink. You cannot connect signals from two different types with each other directly. You need to add some appropriate blocks to make the signals compatible. See the attached simulink file for the example on how to connect these two signals.

  11 Comments

Show 8 older comments
Ayush Srivastava
Ayush Srivastava on 20 Mar 2020 at 10:46
Hi,
Actually there is a problem coming in the simulation of the speed control measurement of the DC motor in the simulink.
The Speed is suddenly changes in the waveform and I think the speed waveform or estimation in the simulink is not appropriate.
I am attaching the waveforms and the circuit diagram for the reference.
Ameer Hamza
Ameer Hamza on 24 Mar 2020 at 3:42
Ayush, I am nor sure what is causing this issue here. This problem requires knowledge about the working of DC motor and its mathematical model, and I don't have much experience with it. However, I can see that this model uses a discontinuous signal, such as PWM signal, encoder, and decoder, which can cause difficulties for the Simulink solver (Also obvious from slow simulation speed). I have attached a revised model by removing these blocks and replacing them with equivalent continuous blocks. This equivalent block may not be helpful for your purpose, but it gives a general idea about how to handle such issues in Simulink.
Ayush Srivastava
Ayush Srivastava on 27 Mar 2020 at 8:08
But my physical model also comprises the components that I have attached in the previous file. So, I can't remove these components.

Sign in to comment.

More Answers (0)

Sign in to answer this question.