How to debug Phase Locked Loop operation

Altair Forum User
Altair Forum User
Altair Employee
edited November 2020 in Community Q&A

The attached files contain the Phase Locked Loop I have developed. But the debug mode does not produce the expected output from the PLL

Unable to find an attachment - read this blog

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hello Vishaka,

     

    Can you please provide with some details of what you are expecting to get and what you are getting? Also, have you tried to simulate the diagram and if yes, is it working as expected there?

     

    Kind regards,

    Isi

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

     A ramp signal must come from monitor buffer 4 in the debug mode. However the expected ramp comes when directly plotted in the code mode. the following is the type of ramp i am expectingImage result for ramp signal

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    It looks to me that your diagram is too demanding for your microcontroller and the algorithm loop doesn't complete in time. Plot the trigger on the _d diagram and you will see that it is flat at 0. Now if you just keep monitor buffer blocks 0 and 1 and recompile you will see that the trigger is up again and running.

     

    Try to make your algorithm more efficient. I am not sure if that would works fine for you but if you replace the integrators with correctly time unitdelay blocks you will have significantly improved the efficiency of your algorithm.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Thank you I will try and let you know