Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Obtain both speed and position from a Resolver In Block?

0 votes
76 views
Hello everyone,

I have an external resolver and I didn't want to utilize two physical inputs to get both speed and position. Is it possible to obtain those two from one resolver in block? When I check the embedded analog devices board used for it, I can see that it can provide both of them via a GUI. Or is there a demo where I can see how to obtain the speed value from position measurement in RTBox?

Thanks in advance!
asked Oct 10 by burak (16 points)

1 Answer

0 votes
The current implementation does not allow to read out position and velocity at the same time. While the AD2S1210 supports this mode in principal, it reduces the bandwidth of the device by a factor of 2.

Whether you calculate the speed from the position or the position from speed depends on the requirements of your model. In the first case you need to handle the wrapping of the angle at 2*pi. A simple example is attached. It assumes that the rotating direction is always positive.
answered Oct 14 by Oliver Schwartz (545 points)
Hello Oliver,

Thanks for your answer but this does not help a lot with my problem, to be honest. A real time application is not simplified like this model, position is not always a perfect triangular and in real world motors also rotate counter clockwise...

The idea I had was to implement a C-Code script, but the errors I get from the block (input terminal limit exceeds range [0] etc. even though I accordingly set the number of inputs outputs or similar) are hard to understand and deal with. A similar type of 2PI wrapping is needed there I guess and also at low speeds, a discrete time filter after the derivative block is definitely necessary. I am not hopeful about that approach but also okay with keep on trying if you have any suggestions at that side.

Lastly, is there a way I can sacrifice that bandwidth and obtain a robust output for both position and speed? Maybe my specific application can handle a lower bandwith?

Thanks for your interest,

Burak
If you want to account for negative speeds, implement the same logic working only for negative speeds. Then use the negative speed if the angle difference from one step to the next is greater than pi, otherwise use the positive speed.

Don't use a C-Script if you can implement the same functionality using blocks.

The implementation does not depend on position being perfect triangular - it just makes the model work for offline simulation.
...