<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MSP432 and TI-RTOS: PID Library Part 2 - Real World Example</title><link>/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-2---real-world-example</link><description>A real hardware test of the port of the very good Arduino PID library to MSP432 LaunchPad and TI-RTOS. PID is a control algorithm. It tries to keep the output of a device at a desired level by controlling its input. Part 1 describes the por...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: MSP432 and TI-RTOS: PID Library Part 2 - Real World Example</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-2---real-world-example</link><pubDate>Thu, 26 Jan 2017 20:25:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ae92ef07-f7ca-4a53-ab97-e6d94ec61bef</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Great post Jan.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Nice review of filter theory too.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2457&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: MSP432 and TI-RTOS: PID Library Part 2 - Real World Example</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-2---real-world-example</link><pubDate>Thu, 26 Jan 2017 11:25:16 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ae92ef07-f7ca-4a53-ab97-e6d94ec61bef</guid><dc:creator>jc2048</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Would it be alright if I make an observation here? You&amp;#39;d do much better with a second-order filter (it only adds two more components).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here&amp;#39;s your filter circuit&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/396x164/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/0172.contentimage_5F00_183771.jpg:396:164]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;this is the frequency response&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x408/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/4314.contentimage_5F00_183772.jpg:620:408]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;you&amp;#39;ve had to position the -3db point at 10Hz to get a response that&amp;#39;s down by 60db at the PWM frequency in order to make the ripple reasonable - here&amp;#39;s the ripple&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x398/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/3718.contentimage_5F00_183773.jpg:620:398]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;but with the -3db point so low the transient response is poor&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x352/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/7041.contentimage_5F00_183774.jpg:620:352]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here&amp;#39;s the circuit of a second-order filter. I&amp;#39;ve chosen the values so that the -60dB point is roughly similiar, so we should get about the same ripple&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/532x164/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/6445.contentimage_5F00_183775.jpg:532:164]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;here&amp;#39;s the frequency response&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x412/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/3302.contentimage_5F00_183776.jpg:620:412]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;the ripple is similar&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x398/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/1258.contentimage_5F00_183777.jpg:620:398]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;but now look at the transient performance - it&amp;#39;s about ten times better. Much more agile and responsive - though it does mean your loop tuning will be more challenging to control it. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x352/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-ae92ef07-f7ca-4a53-ab97-e6d94ec61bef/0753.contentimage_5F00_183778.jpg:620:352]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2457&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: MSP432 and TI-RTOS: PID Library Part 2 - Real World Example</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-2---real-world-example</link><pubDate>Wed, 25 Jan 2017 22:46:27 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ae92ef07-f7ca-4a53-ab97-e6d94ec61bef</guid><dc:creator>jc2048</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;&amp;quot;The 10K resistor in parallel with the capacitor is there to have a discharge path.&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I didn&amp;#39;t understand that bit. Why do you need a discharge path (other than the 5K resistor)?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2457&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>