#qi-hardware IRC log for Thursday, 2015-01-08

qi-bot[commit] Werner Almesberger: slicer/README: correct style and a typo (master) http://qi-hw.com/p/cae-tools/73c048912:55
qi-bot[commit] Werner Almesberger: slicer/stl.c, stl.h: copy over from Neo900 misc/meme/ (master) http://qi-hw.com/p/cae-tools/632a60f12:55
qi-bot[commit] Werner Almesberger: slicer/stl.h, stl.c: adapt for use in slicer (master) http://qi-hw.com/p/cae-tools/5f31b9412:55
qi-bot[commit] Werner Almesberger: slicer/slice.h, slice.c, util.h: extract outlines of Z slices from mesh (master) http://qi-hw.com/p/cae-tools/49abc1312:55
qi-bot[commit] Werner Almesberger: slicer/slice.c (add): only output lower end of vertical walls (still needs work) (master) http://qi-hw.com/p/cae-tools/3f2c6cd12:55
qi-bot[commit] Werner Almesberger: slicer/stl.c (stl_load_file): support binary STL as well (on little-endian hosts) (master) http://qi-hw.com/p/cae-tools/c82ea1012:55
qi-bot[commit] Werner Almesberger: slicer/slice.c: repeat lower cuts at intermediate points (master) http://qi-hw.com/p/cae-tools/6a12d4712:55
qi-bot[commit] Werner Almesberger: slicer/stl.c: mention where the format is documented (master) http://qi-hw.com/p/cae-tools/c98402112:55
qi-bot[commit] Werner Almesberger: slicer/slice.c (add): detect and report inclined facets (master) http://qi-hw.com/p/cae-tools/a30024d12:55
qi-bot[commit] Werner Almesberger: slicer/stl.c (stl_load_binary): remove debug output (master) http://qi-hw.com/p/cae-tools/65fa69c12:55
qi-bot[commit] Werner Almesberger: slicer/slice.c, slice.h: optionally draw a box around the object (master) http://qi-hw.com/p/cae-tools/6b7ceca12:55
qi-bot[commit] Werner Almesberger: slicer/Makefile, slicer.c: forgot to commit these files :-( (master) http://qi-hw.com/p/cae-tools/aa327c812:55
qi-bot[commit] Werner Almesberger: slicer/slice.c (dump_layer): don't draw the top end of walls (master) http://qi-hw.com/p/cae-tools/9fc096212:55
qi-bot[commit] Werner Almesberger: slicer/: new option -z to add intermediate layers (master) http://qi-hw.com/p/cae-tools/b2d6ef512:55
pcercueiC-C-C-COMBO BREAKER12:56
wpwrakphew :) http://knowyourmeme.com/memes/combo-breaker12:56
wpwrak(giving freecad another try. but without having to suffer crappy toolpaths in return :)13:00
DocScrutinizer05pcercuei: I tend to agree17:42
DocScrutinizer05posting commit messages to IRC is kinda abusive17:43
wpwraknaw, i like it. shows where things are happening. but it may help if very long sequences would get truncated.17:54
DocScrutinizer05by definition/netiquette of IRC, a bot shouldn't spam a channel with unsolicited info. It might be tolerable when you do this in a dedicated channel which users would join only when they are interested in that sort of automated update about "where things happen". For a channel with /topic "hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects" I'd consider such 18:19
DocScrutinizer05automated 'tweets' quite inappropriate18:19
DocScrutinizer05but obviously that's pretty much up to the individual channel's policies, as set up by the channel founders18:20
DocScrutinizer05wpwrak: wut? Argentinia building the RN40 since EIGHTY years and still not even half done? real fun!20:50
DocScrutinizer05well, Koeln dome took longer to be not finished yet ;-)20:55
wpwraki think you mean paved, not constructed. where are many unpaved roads in argentia. please remember that it's a big country and traffic can be fairly light in some areas :)21:15
wpwraks/where/there/21:22
eintopfwpwrak: do you have a car in argentia?21:28
wpwrakyup, and i think i've driven on RN40 (the paved part :)21:29
Action: eintopf image some linux car with a big fat linux sticker at the back21:30
eintopfoh wait21:30
eintopfI know wpwrak car21:30
eintopfhttp://www.spiegel.de/auto/aktuell/mobiles-buero-auf-dem-beifahrersitz-polizei-stoppt-autofahrer-a-866960.html - (german article)21:31
eintopfyou don't need to understand german if you see this picture:21:31
eintopfhttp://cdn2.spiegel.de/images/image-424469-galleryV9-nokm.jpg21:31
eintopfbut the solder station is missing there21:32
eintopfmaybe baking some boards on the top of the motor while driving the car ;-)21:32
eintopfwpwrak: please don't be angry.... it's just funny. Maybe you have something similar in your car and for me that's pretty cool21:35
wpwrakthat looks kinda dangerous :)21:36
wpwraknaw, the only "diy" addition is a gps support21:38
eintopf:-(21:41
eintopfI finished my implementation for controlling a inverted pendulum via matlab PID code generation (some project for my study)21:45
eintopfit's simulated in a physic engine only21:45
eintopfbut I implemented a cool opengl plotter for the PID error21:46
eintopfmy experience, you don't need the fancy matlab thing... but I can't say this in my course21:46
eintopfand matlab simulink code generation - I don't know if I can setup some settings for generating code  for 8bit mcu. I mean the code generator need to be sure that there is no overflow, etc...21:47
eintopfsomebody wants to have some x86_64 binary to see how a PID works? it's magic21:49
DocScrutinizer05thanks, I've built both analog and digital PID controllers21:50
DocScrutinizer05:-)21:50
eintopfit's magic because I have only some error value with no dimension and the PID try to get this error at 0... okay that's how a PID works21:50
eintopfbut the gains, it's purely randomness21:50
eintopfDocScrutinizer05: :O analog PID controller?21:50
DocScrutinizer05sure21:50
eintopfthis is fast21:51
DocScrutinizer05that's how that stuff started21:51
eintopfah, ok.21:51
DocScrutinizer05some prolly 100 years ago21:51
eintopfdo you also do some fuzzy logic?21:51
DocScrutinizer05hardly ever21:51
DocScrutinizer05I think fuzzy logic is a joke21:51
DocScrutinizer05I can do logic of arbitrary "fuzziness" in proper digital21:52
DocScrutinizer05no need for "gaaaaaanz viel 0 is ein klein bisschen 1"21:53
eintopfand for what do you use the PID?21:54
eintopffor controlling things...21:54
eintopfI mean when do you use PID and when fuzzy21:54
eintopfokay the PID error value plot looks more like a sin(x) with some damping21:55
eintopfand fuzzy looks different, then fuzzy is maybe better21:55
DocScrutinizer05when it looks too much like sin(x) you should adjust the integral factor21:56
eintopfah, an expert21:57
eintopfI have a little input box where I can change the values on the fly21:57
DocScrutinizer05PID regulators are used literally everywhere21:58
DocScrutinizer05there is math to calibrate the PID from known parameters of the controlled system, but they are tedious and it's generally easier to simply adjust the stuff live22:03
DocScrutinizer05particularly since it's quite difficult to acquire a comprehensive set of parameters of the controlled system, incl all actors and sensors22:04
eintopfyes, matlab has also some feature to auto-detect the gains22:05
eintopfbut then I need to have my physical model inside matlab22:05
eintopfand my physic engine only understand setMotorSpeed(500)22:06
eintopfdon't know what 500 means :-)22:06
DocScrutinizer05hehe22:06
eintopfthis will cost much time22:06
eintopfbut for the PID this doesn't matter22:06
eintopfhe only tries to get the error value -> 022:06
DocScrutinizer05yep22:07
DocScrutinizer05it's more about inertia and momentum, about delays etc in your system22:07
DocScrutinizer05phase shift22:07
DocScrutinizer05and those are hard to measure, for any physical object22:08
DocScrutinizer05basically you compensate delay with the D component and inertia with the I component22:09
DocScrutinizer05funny even the letters match :-D22:10
DocScrutinizer05just noticed first time22:10
DocScrutinizer05you can also think of differential component as highpass and integral component as lowpass22:12
eintopfI used the normal PID controller from wikipedia22:13
eintopfpure simple22:13
eintopfwith the matlab componentes Integral 1/s and derivate22:13
eintopfand sum function at end22:14
eintopfthe P gain is only to set my "setMotorSpeed" to some value which fits22:14
eintopfnot too fast, not too slow22:14
eintopfand I simple experiment with all values22:14
eintopfI know the matlab builtin PID controller has some filter22:15
eintopfbut I didn't understand that, if I set the filter coefficient above 0, nothing worked anymore22:16
eintopfa build a own one22:16
eintopfhttp://www.mathworks.com/help/simulink/slref/pid_controller_parallel.png22:16
eintopfthat's the normal MATLAB PID controller22:16
eintopfI simple have a "normal" deivate block after D-Gain22:17
eintopfdon't know what matlab tries to do there22:17
DocScrutinizer05well, they build a differentiator from an integrator22:19
DocScrutinizer05a highpass for x is what you get from x-lowpass(x)22:20
DocScrutinizer05in simple analog this would be a capacitor feeding back opamp output to negative input22:21
DocScrutinizer05ooops sorry, nope, the contrary22:22
DocScrutinizer05this would be a capacitor shorting high frequencies of the feedback to ground, in negative input22:22
DocScrutinizer05the 1/s feeding back low frequencies to the inverting input, thus attenuating them22:25
eintopfah22:26
DocScrutinizer05and such feedback however can't reduce the amplification to <122:27
eintopfI know lowpass filter. A rc-circuit.22:27
DocScrutinizer05:nod:22:27
eintopfoh22:28
eintopfWhen I started my study I had some frequency generator and making serval RC-circuits. Then I looked at oscilloscope what happens22:29
eintopfthe first time where I understand for what's good for22:29
DocScrutinizer05ypur amplification in such feedback filter needs to be >1 to produce any significant difference in output signal between filtered and non-filtered frequencies22:30
DocScrutinizer05quite possibly a feed-forward filter would be better suited for that usecase than a feedback filter22:31
DocScrutinizer05a filter without feedback could result in output amplitude approaching zero for frequency approaching zero22:33
eintopfI think I don't do any filtering now, but thanks for the info22:35
DocScrutinizer05the stuff http://www.mathworks.com/help/simulink/slref/pid_controller_parallel.png shows would still have output = input (amplification = 1) and for higher frequencies it would reach the amplification of the "N filter coefficient"22:35
eintopfI also saw some filtering about position and the acceleration, which is calculated by position''. They had some weights with pos_filter = (pos_avg * 0.1) + (real_pos * 0,9);22:36
eintopfah so I don't have higher frequency, this will reduce some wobble pendulum :-)22:37
DocScrutinizer05maybe it helps to think about you following another car with your car on the highway. You have a very accurate way to detect the distance to the car you're following and your goal is to keep a certain constant distance22:46
DocScrutinizer05consider what you would do to the trottle when you notice your distance is 10% too short.22:47
DocScrutinizer05you also would act differnt based on your observation if that distance is short but constant or the car before you is actually slower than you22:47
DocScrutinizer05that's the D component22:48
DocScrutinizer05to adjust your speed to the other car quickly22:48
DocScrutinizer05when you notice you're 10% short but same speed, you slowly reduce throttle gradually. That's the I component22:49
eintopfahhh22:50
DocScrutinizer05too much I without any D would result in oscillation22:52
DocScrutinizer05but too high D would also result in oscillation22:53
DocScrutinizer05both of them too low would result in your distance never getting right22:54
DocScrutinizer05the P component is basically just to adjust the target distance you want to keep23:04
DocScrutinizer05sorry when there's anything incorrect in all this, it's what I recall from my experience with PID which is quite several years ago already23:11
DocScrutinizer05also note there are serial PID as well. What you shown is a parallel PID23:13
DocScrutinizer05I think you can have hours of fun with https://en.wikipedia.org/wiki/PID_controller and particularly https://de.wikipedia.org/wiki/Regler#PID-Regler  ;-)23:22
DocScrutinizer05actually nope, P component is what determines the working point and thus characteristics of the whole regulator. (over-damped vs overshooting)23:52
--- Fri Jan 9 201500:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!