This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Calibrate sin and cos value



Hello,

Now I have a sensor which sends 2 signals sin and cos in order to calculate angle. But you know that we have always the disturbance or noise and that makes value of ( sin*sin +  cos*cos) not equal 1. So I dont know if we have the best way to solve this problem ?

In my opinion, we will consider one of signals is always correct and calibrate or recalculate the other signal base on the value we chose.  

Max

  • Max,

    I can only recommend what was done in the sincos library.  There, we filtered the incoming sin and cos data streams to minimize noise, and logged maximum and minimum values over a pre-determined number of electrical cycles.  Once we had those, we calculated the range and offset of each channel and applied these updated calibration values to the raw data.  Figure 4 in attached extract from the sincos User's Guide outlines the method.  You are correct that it is only necessary to match the gain of one channel to that of the other.

    Potential issues with this technique are that you have to wait for the first update to happen before you have any calibration data, so the first measurements are running with default offsets and gains.  Also, if there is a lot of noise the calibration update may upset the measurements when it takes place.  Nevertheless, the technique worked pretty well for us.

    Regards,

    Richard

  • Thanks for ur suggestion.It seems that this library supports only F283xx series. But I think that I will find out some tricks from this one to solve my problem.