Finish lecture 20 and 21

MetaPost
Øyvind Skaaden 2020-12-05 21:54:40 +01:00
parent 2a457997c4
commit d695025ad0
2 changed files with 563 additions and 1 deletions

View File

@ -0,0 +1,349 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:ns1="http://wanglongqi.github.io/WriteTeX"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="51.560955mm"
height="22.29081mm"
viewBox="0 0 51.560955 22.29081"
version="1.1"
id="svg8">
<defs
id="defs2">
<marker
style="overflow:visible"
id="marker1270"
refX="0"
refY="0"
orient="auto">
<path
transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1268" />
</marker>
<marker
style="overflow:visible"
id="Arrow1Mend"
refX="0"
refY="0"
orient="auto">
<path
transform="matrix(-0.4,0,0,-0.4,-4,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path848" />
</marker>
<marker
style="overflow:visible"
id="Arrow1Send"
refX="0"
refY="0"
orient="auto">
<path
transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path854" />
</marker>
<marker
style="overflow:visible"
id="Arrow2Mend"
refX="0"
refY="0"
orient="auto">
<path
transform="scale(-0.6)"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
id="path866" />
</marker>
<marker
style="overflow:visible"
id="Arrow2Lend"
refX="0"
refY="0"
orient="auto">
<path
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
id="path860" />
</marker>
<marker
style="overflow:visible"
id="marker1270-6"
refX="0"
refY="0"
orient="auto">
<path
transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1268-7" />
</marker>
</defs>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-51.261413,-57.838217)">
<path
style="fill:none;stroke:#000000;stroke-width:0.155454;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
d="M 76.261724,77.83537 V 58.144567"
id="path1137" />
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1270)"
d="M 76.261724,77.83537 H 100.81368"
id="path1266" />
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 51.709763,77.83537 H 76.261724"
id="path1266-5" />
<path
style="fill:none;stroke:#0000fe;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.5875, 0.264583;stroke-dashoffset:0;stroke-opacity:1"
d="m 66.723219,77.900611 v -10.05319 h 9.534943"
id="path1381" />
<path
style="fill:none;stroke:#0000fe;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.5875, 0.264583;stroke-dashoffset:0;stroke-opacity:1"
d="M 85.793105,77.900611 V 67.847421 H 76.258162"
id="path1381-3" />
<g
ns1:text="$$H_D(\omega)$$"
transform="matrix(0.27041724,0,0,0.27041724,-79.742662,30.980641)"
id="g1499">
<g
id="surface1">
<g
style="fill:#000000;fill-opacity:1"
id="g1480">
<path
style="stroke:none"
d="M 7.609375,-6.046875 C 7.703125,-6.40625 7.71875,-6.5 8.4375,-6.5 c 0.265625,0 0.34375,0 0.34375,-0.203125 0,-0.109375 -0.109375,-0.109375 -0.140625,-0.109375 -0.28125,0 -1,0.03125 -1.28125,0.03125 -0.28125,0 -0.984375,-0.03125 -1.28125,-0.03125 -0.078125,0 -0.1875,0 -0.1875,0.203125 0,0.109375 0.09375,0.109375 0.28125,0.109375 0.015625,0 0.203125,0 0.375,0.015625 0.1875,0.03125 0.265625,0.03125 0.265625,0.171875 0,0.03125 0,0.046875 -0.03125,0.1875 L 6.1875,-3.703125 H 3.140625 l 0.59375,-2.34375 C 3.8125,-6.40625 3.84375,-6.5 4.5625,-6.5 c 0.265625,0 0.34375,0 0.34375,-0.203125 0,-0.109375 -0.109375,-0.109375 -0.140625,-0.109375 -0.28125,0 -1,0.03125 -1.28125,0.03125 -0.28125,0 -0.984375,-0.03125 -1.28125,-0.03125 -0.078125,0 -0.1875,0 -0.1875,0.203125 0,0.109375 0.09375,0.109375 0.28125,0.109375 0.015625,0 0.203125,0 0.375,0.015625 0.171875,0.03125 0.265625,0.03125 0.265625,0.171875 0,0.03125 0,0.0625 -0.03125,0.1875 L 1.5625,-0.78125 c -0.09375,0.390625 -0.109375,0.46875 -0.90625,0.46875 -0.171875,0 -0.265625,0 -0.265625,0.203125 C 0.390625,0 0.515625,0 0.53125,0 0.8125,0 1.515625,-0.03125 1.796875,-0.03125 2,-0.03125 2.21875,-0.015625 2.4375,-0.015625 2.65625,-0.015625 2.875,0 3.078125,0 3.15625,0 3.28125,0 3.28125,-0.203125 3.28125,-0.3125 3.1875,-0.3125 3,-0.3125 c -0.375,0 -0.640625,0 -0.640625,-0.171875 0,-0.0625 0.015625,-0.109375 0.015625,-0.171875 l 0.6875,-2.734375 h 3.03125 c -0.40625,1.65625 -0.640625,2.609375 -0.6875,2.75 C 5.3125,-0.3125 5.125,-0.3125 4.5,-0.3125 c -0.140625,0 -0.234375,0 -0.234375,0.203125 C 4.265625,0 4.390625,0 4.40625,0 4.6875,0 5.390625,-0.03125 5.671875,-0.03125 5.875,-0.03125 6.09375,-0.015625 6.3125,-0.015625 6.53125,-0.015625 6.75,0 6.953125,0 7.03125,0 7.15625,0 7.15625,-0.203125 7.15625,-0.3125 7.0625,-0.3125 6.875,-0.3125 c -0.359375,0 -0.640625,0 -0.640625,-0.171875 0,-0.0625 0.015625,-0.109375 0.03125,-0.171875 z m 0,0"
transform="translate(580.368,110.99)"
id="path1478" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1484">
<path
style="stroke:none"
d="M 1.3125,-0.546875 C 1.265625,-0.3125 1.25,-0.25 0.703125,-0.25 0.578125,-0.25 0.5,-0.25 0.5,-0.09375 0.5,0 0.578125,0 0.703125,0 H 3.1875 c 1.546875,0 3.03125,-1.421875 3.03125,-2.9375 0,-1.015625 -0.703125,-1.828125 -1.828125,-1.828125 H 1.84375 c -0.140625,0 -0.21875,0 -0.21875,0.15625 0,0.09375 0.078125,0.09375 0.234375,0.09375 0.109375,0 0.140625,0 0.265625,0.015625 0.140625,0.015625 0.140625,0.03125 0.140625,0.109375 0,0 0,0.046875 -0.015625,0.140625 z m 1.5625,-3.71875 c 0.0625,-0.21875 0.0625,-0.25 0.359375,-0.25 H 4.125 c 0.78125,0 1.4375,0.390625 1.4375,1.34375 0,0.15625 -0.078125,1.359375 -0.765625,2.15625 C 4.515625,-0.703125 3.921875,-0.25 3.0625,-0.25 H 2.125 c -0.21875,0 -0.234375,-0.015625 -0.234375,-0.078125 0,0 0,-0.03125 0.03125,-0.140625 z m 0,0"
transform="translate(588.649,112.485)"
id="path1482" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1488">
<path
style="stroke:none"
d="m 3.296875,2.390625 c 0,-0.03125 0,-0.046875 -0.171875,-0.21875 C 1.890625,0.921875 1.5625,-0.96875 1.5625,-2.5 c 0,-1.734375 0.375,-3.46875 1.609375,-4.703125 0.125,-0.125 0.125,-0.140625 0.125,-0.171875 0,-0.078125 -0.03125,-0.109375 -0.09375,-0.109375 -0.109375,0 -1,0.6875 -1.59375,1.953125 -0.5,1.09375 -0.625,2.203125 -0.625,3.03125 0,0.78125 0.109375,1.984375 0.65625,3.125 C 2.25,1.84375 3.09375,2.5 3.203125,2.5 c 0.0625,0 0.09375,-0.03125 0.09375,-0.109375 z m 0,0"
transform="translate(595.876,110.99)"
id="path1486" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1492">
<path
style="stroke:none"
d="m 6.03125,-3.703125 c 0,-0.453125 -0.171875,-0.703125 -0.40625,-0.703125 -0.25,0 -0.515625,0.234375 -0.515625,0.46875 0,0.09375 0.046875,0.203125 0.140625,0.296875 0.171875,0.15625 0.359375,0.421875 0.359375,0.84375 0,0.390625 -0.203125,0.96875 -0.5,1.421875 C 4.8125,-0.953125 4.4375,-0.609375 3.96875,-0.609375 3.40625,-0.609375 3.09375,-0.96875 3,-1.5 c 0.109375,-0.265625 0.34375,-0.90625 0.34375,-1.1875 0,-0.109375 -0.046875,-0.21875 -0.1875,-0.21875 -0.078125,0 -0.1875,0.03125 -0.265625,0.171875 C 2.78125,-2.53125 2.65625,-1.890625 2.65625,-1.53125 2.328125,-1.0625 1.9375,-0.609375 1.3125,-0.609375 c -0.671875,0 -0.875,-0.59375 -0.875,-1.140625 0,-1.25 1.015625,-2.296875 1.015625,-2.421875 0,-0.109375 -0.078125,-0.1875 -0.1875,-0.1875 -0.125,0 -0.203125,0.125 -0.265625,0.21875 -0.5,0.734375 -0.875,1.921875 -0.875,2.828125 0,0.6875 0.21875,1.421875 1.046875,1.421875 0.703125,0 1.171875,-0.5 1.53125,-1.046875 0.09375,0.578125 0.484375,1.046875 1.09375,1.046875 0.78125,0 1.25,-0.609375 1.609375,-1.359375 0.25,-0.484375 0.625,-1.84375 0.625,-2.453125 z m 0,0"
transform="translate(599.75,110.99)"
id="path1490" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1496">
<path
style="stroke:none"
d="m 2.875,-2.5 c 0,-0.765625 -0.109375,-1.96875 -0.65625,-3.109375 -0.59375,-1.21875 -1.453125,-1.875 -1.546875,-1.875 -0.0625,0 -0.109375,0.046875 -0.109375,0.109375 0,0.03125 0,0.046875 0.1875,0.234375 0.984375,0.984375 1.546875,2.5625 1.546875,4.640625 0,1.71875 -0.359375,3.46875 -1.59375,4.71875 C 0.5625,2.34375 0.5625,2.359375 0.5625,2.390625 0.5625,2.453125 0.609375,2.5 0.671875,2.5 0.765625,2.5 1.671875,1.8125 2.25,0.546875 2.765625,-0.546875 2.875,-1.65625 2.875,-2.5 Z m 0,0"
transform="translate(606.309,110.99)"
id="path1494" />
</g>
</g>
</g>
<g
ns1:text="$$\omega_c$$"
transform="matrix(0.22702811,0,0,0.22702811,-49.153512,54.07998)"
id="g1569">
<g
id="g1567">
<g
style="fill:#000000;fill-opacity:1"
id="g1561">
<path
style="stroke:none"
d="m 6.03125,-3.703125 c 0,-0.453125 -0.171875,-0.703125 -0.40625,-0.703125 -0.25,0 -0.515625,0.234375 -0.515625,0.46875 0,0.09375 0.046875,0.203125 0.140625,0.296875 0.171875,0.15625 0.359375,0.421875 0.359375,0.84375 0,0.390625 -0.203125,0.96875 -0.5,1.421875 C 4.8125,-0.953125 4.4375,-0.609375 3.96875,-0.609375 3.40625,-0.609375 3.09375,-0.96875 3,-1.5 c 0.109375,-0.265625 0.34375,-0.90625 0.34375,-1.1875 0,-0.109375 -0.046875,-0.21875 -0.1875,-0.21875 -0.078125,0 -0.1875,0.03125 -0.265625,0.171875 C 2.78125,-2.53125 2.65625,-1.890625 2.65625,-1.53125 2.328125,-1.0625 1.9375,-0.609375 1.3125,-0.609375 c -0.671875,0 -0.875,-0.59375 -0.875,-1.140625 0,-1.25 1.015625,-2.296875 1.015625,-2.421875 0,-0.109375 -0.078125,-0.1875 -0.1875,-0.1875 -0.125,0 -0.203125,0.125 -0.265625,0.21875 -0.5,0.734375 -0.875,1.921875 -0.875,2.828125 0,0.6875 0.21875,1.421875 1.046875,1.421875 0.703125,0 1.171875,-0.5 1.53125,-1.046875 0.09375,0.578125 0.484375,1.046875 1.09375,1.046875 0.78125,0 1.25,-0.609375 1.609375,-1.359375 0.25,-0.484375 0.625,-1.84375 0.625,-2.453125 z m 0,0"
transform="translate(590.146,110.99)"
id="path1559" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1565">
<path
style="stroke:none"
d="m 3.046875,-2.671875 c -0.25,0.046875 -0.34375,0.234375 -0.34375,0.390625 0,0.1875 0.140625,0.265625 0.265625,0.265625 0.15625,0 0.390625,-0.109375 0.390625,-0.453125 0,-0.46875 -0.53125,-0.609375 -0.90625,-0.609375 -1.046875,0 -2.015625,0.96875 -2.015625,1.9375 0,0.59375 0.40625,1.203125 1.28125,1.203125 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 c -0.5,0 -0.71875,-0.34375 -0.71875,-0.78125 0,-0.1875 0.09375,-0.953125 0.453125,-1.4375 0.265625,-0.34375 0.625,-0.53125 0.984375,-0.53125 0.09375,0 0.421875,0.015625 0.59375,0.203125 z m 0,0"
transform="translate(596.347,112.485)"
id="path1563" />
</g>
</g>
</g>
<g
ns1:text="$$-\omega_c$$"
transform="matrix(0.22702811,0,0,0.22702811,-68.611477,54.07998)"
id="g1631">
<g
id="g1629">
<g
style="fill:#000000;fill-opacity:1"
id="g1619">
<path
style="stroke:none"
d="m 6.5625,-2.296875 c 0.171875,0 0.359375,0 0.359375,-0.203125 0,-0.1875 -0.1875,-0.1875 -0.359375,-0.1875 H 1.171875 c -0.171875,0 -0.34375,0 -0.34375,0.1875 0,0.203125 0.171875,0.203125 0.34375,0.203125 z m 0,0"
transform="translate(586.271,110.99)"
id="path1617" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1623">
<path
style="stroke:none"
d="m 6.03125,-3.703125 c 0,-0.453125 -0.171875,-0.703125 -0.40625,-0.703125 -0.25,0 -0.515625,0.234375 -0.515625,0.46875 0,0.09375 0.046875,0.203125 0.140625,0.296875 0.171875,0.15625 0.359375,0.421875 0.359375,0.84375 0,0.390625 -0.203125,0.96875 -0.5,1.421875 C 4.8125,-0.953125 4.4375,-0.609375 3.96875,-0.609375 3.40625,-0.609375 3.09375,-0.96875 3,-1.5 c 0.109375,-0.265625 0.34375,-0.90625 0.34375,-1.1875 0,-0.109375 -0.046875,-0.21875 -0.1875,-0.21875 -0.078125,0 -0.1875,0.03125 -0.265625,0.171875 C 2.78125,-2.53125 2.65625,-1.890625 2.65625,-1.53125 2.328125,-1.0625 1.9375,-0.609375 1.3125,-0.609375 c -0.671875,0 -0.875,-0.59375 -0.875,-1.140625 0,-1.25 1.015625,-2.296875 1.015625,-2.421875 0,-0.109375 -0.078125,-0.1875 -0.1875,-0.1875 -0.125,0 -0.203125,0.125 -0.265625,0.21875 -0.5,0.734375 -0.875,1.921875 -0.875,2.828125 0,0.6875 0.21875,1.421875 1.046875,1.421875 0.703125,0 1.171875,-0.5 1.53125,-1.046875 0.09375,0.578125 0.484375,1.046875 1.09375,1.046875 0.78125,0 1.25,-0.609375 1.609375,-1.359375 0.25,-0.484375 0.625,-1.84375 0.625,-2.453125 z m 0,0"
transform="translate(594.02,110.99)"
id="path1621" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1627">
<path
style="stroke:none"
d="m 3.046875,-2.671875 c -0.25,0.046875 -0.34375,0.234375 -0.34375,0.390625 0,0.1875 0.140625,0.265625 0.265625,0.265625 0.15625,0 0.390625,-0.109375 0.390625,-0.453125 0,-0.46875 -0.53125,-0.609375 -0.90625,-0.609375 -1.046875,0 -2.015625,0.96875 -2.015625,1.9375 0,0.59375 0.40625,1.203125 1.28125,1.203125 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 c -0.5,0 -0.71875,-0.34375 -0.71875,-0.78125 0,-0.1875 0.09375,-0.953125 0.453125,-1.4375 0.265625,-0.34375 0.625,-0.53125 0.984375,-0.53125 0.09375,0 0.421875,0.015625 0.59375,0.203125 z m 0,0"
transform="translate(600.221,112.485)"
id="path1625" />
</g>
</g>
</g>
<g
ns1:text="$$1$$"
transform="matrix(0.15376711,0,0,0.15376711,-15.951116,50.438951)"
id="g1695">
<g
id="g1693">
<g
style="fill:#000000;fill-opacity:1"
id="g1691">
<path
style="stroke:none"
d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 v 0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 v 5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 h -0.3125 V 0 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 v -0.3125 h -0.3125 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
transform="translate(592.785,110.99)"
id="path1689" />
</g>
</g>
</g>
<g
ns1:text="$$0$$"
transform="matrix(0.15376711,0,0,0.15376711,-14.883067,62.1811)"
id="g1759">
<g
id="g1757">
<g
style="fill:#000000;fill-opacity:1"
id="g1755">
<path
style="stroke:none"
d="m 4.578125,-3.1875 c 0,-0.796875 -0.046875,-1.59375 -0.390625,-2.328125 -0.453125,-0.96875 -1.28125,-1.125 -1.6875,-1.125 -0.609375,0 -1.328125,0.265625 -1.75,1.1875 -0.3125,0.6875 -0.359375,1.46875 -0.359375,2.265625 0,0.75 0.03125,1.640625 0.453125,2.40625 0.421875,0.796875 1.15625,1 1.640625,1 0.53125,0 1.296875,-0.203125 1.734375,-1.15625 0.3125,-0.6875 0.359375,-1.46875 0.359375,-2.25 z M 2.484375,0 C 2.09375,0 1.5,-0.25 1.328125,-1.203125 1.21875,-1.796875 1.21875,-2.71875 1.21875,-3.3125 c 0,-0.640625 0,-1.296875 0.078125,-1.828125 0.1875,-1.1875 0.9375,-1.28125 1.1875,-1.28125 0.328125,0 0.984375,0.1875 1.171875,1.171875 0.109375,0.5625 0.109375,1.3125 0.109375,1.9375 0,0.75 0,1.421875 -0.109375,2.0625 C 3.5,-0.296875 2.9375,0 2.484375,0 Z m 0,0"
transform="translate(592.785,110.99)"
id="path1753" />
</g>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 53.297262,77.83537 V 77.050206"
id="path1767" />
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 53.297262,78.620534 V 77.83537"
id="path1767-5" />
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 99.226176,77.83537 V 77.050206"
id="path1767-6" />
<path
style="fill:none;stroke:#000000;stroke-width:0.165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 99.226176,78.620534 V 77.83537"
id="path1767-5-2" />
<g
ns1:text="$$\pi$$"
transform="matrix(0.30082143,0,0,0.30082143,-79.731778,46.707953)"
id="g1866">
<g
id="g1864">
<g
style="fill:#000000;fill-opacity:1"
id="g1862">
<path
style="stroke:none"
d="m 2.640625,-3.71875 h 1.125 C 3.4375,-2.25 3.34375,-1.8125 3.34375,-1.140625 c 0,0.140625 0,0.40625 0.078125,0.75 0.109375,0.4375 0.21875,0.5 0.359375,0.5 0.203125,0 0.421875,-0.171875 0.421875,-0.375 0,-0.0625 0,-0.078125 -0.0625,-0.21875 -0.296875,-0.71875 -0.296875,-1.375 -0.296875,-1.65625 0,-0.515625 0.078125,-1.0625 0.1875,-1.578125 h 1.125 c 0.140625,0 0.5,0 0.5,-0.34375 0,-0.234375 -0.21875,-0.234375 -0.40625,-0.234375 H 1.90625 c -0.21875,0 -0.59375,0 -1.03125,0.46875 -0.34375,0.390625 -0.609375,0.84375 -0.609375,0.890625 0,0.015625 0,0.109375 0.125,0.109375 0.078125,0 0.09375,-0.046875 0.15625,-0.125 C 1.03125,-3.71875 1.609375,-3.71875 1.8125,-3.71875 H 2.375 C 2.0625,-2.515625 1.53125,-1.3125 1.109375,-0.40625 1.03125,-0.25 1.03125,-0.234375 1.03125,-0.15625 c 0,0.1875 0.15625,0.265625 0.28125,0.265625 0.296875,0 0.375,-0.28125 0.5,-0.640625 C 1.953125,-1 1.953125,-1.015625 2.078125,-1.515625 Z m 0,0"
transform="translate(592.257,110.99)"
id="path1860" />
</g>
</g>
</g>
<g
ns1:text="$$-\pi$$"
transform="matrix(0.30082143,0,0,0.30082143,-125.98592,46.707953)"
id="g1946">
<g
id="g1944">
<g
style="fill:#000000;fill-opacity:1"
id="g1938">
<path
style="stroke:none"
d="m 6.5625,-2.296875 c 0.171875,0 0.359375,0 0.359375,-0.203125 0,-0.1875 -0.1875,-0.1875 -0.359375,-0.1875 H 1.171875 c -0.171875,0 -0.34375,0 -0.34375,0.1875 0,0.203125 0.171875,0.203125 0.34375,0.203125 z m 0,0"
transform="translate(588.383,110.99)"
id="path1936" />
</g>
<g
style="fill:#000000;fill-opacity:1"
id="g1942">
<path
style="stroke:none"
d="m 2.640625,-3.71875 h 1.125 C 3.4375,-2.25 3.34375,-1.8125 3.34375,-1.140625 c 0,0.140625 0,0.40625 0.078125,0.75 0.109375,0.4375 0.21875,0.5 0.359375,0.5 0.203125,0 0.421875,-0.171875 0.421875,-0.375 0,-0.0625 0,-0.078125 -0.0625,-0.21875 -0.296875,-0.71875 -0.296875,-1.375 -0.296875,-1.65625 0,-0.515625 0.078125,-1.0625 0.1875,-1.578125 h 1.125 c 0.140625,0 0.5,0 0.5,-0.34375 0,-0.234375 -0.21875,-0.234375 -0.40625,-0.234375 H 1.90625 c -0.21875,0 -0.59375,0 -1.03125,0.46875 -0.34375,0.390625 -0.609375,0.84375 -0.609375,0.890625 0,0.015625 0,0.109375 0.125,0.109375 0.078125,0 0.09375,-0.046875 0.15625,-0.125 C 1.03125,-3.71875 1.609375,-3.71875 1.8125,-3.71875 H 2.375 C 2.0625,-2.515625 1.53125,-1.3125 1.109375,-0.40625 1.03125,-0.25 1.03125,-0.234375 1.03125,-0.15625 c 0,0.1875 0.15625,0.265625 0.28125,0.265625 0.296875,0 0.375,-0.28125 0.5,-0.640625 C 1.953125,-1 1.953125,-1.015625 2.078125,-1.515625 Z m 0,0"
transform="translate(596.132,110.99)"
id="path1940" />
</g>
</g>
</g>
<g
ns1:text="$$\omega$$"
transform="matrix(0.24389371,0,0,0.24389371,-43.032716,51.298738)"
id="g2030">
<g
id="g2028">
<g
style="fill:#000000;fill-opacity:1"
id="g2026">
<path
style="stroke:none"
d="m 6.03125,-3.703125 c 0,-0.453125 -0.171875,-0.703125 -0.40625,-0.703125 -0.25,0 -0.515625,0.234375 -0.515625,0.46875 0,0.09375 0.046875,0.203125 0.140625,0.296875 0.171875,0.15625 0.359375,0.421875 0.359375,0.84375 0,0.390625 -0.203125,0.96875 -0.5,1.421875 C 4.8125,-0.953125 4.4375,-0.609375 3.96875,-0.609375 3.40625,-0.609375 3.09375,-0.96875 3,-1.5 c 0.109375,-0.265625 0.34375,-0.90625 0.34375,-1.1875 0,-0.109375 -0.046875,-0.21875 -0.1875,-0.21875 -0.078125,0 -0.1875,0.03125 -0.265625,0.171875 C 2.78125,-2.53125 2.65625,-1.890625 2.65625,-1.53125 2.328125,-1.0625 1.9375,-0.609375 1.3125,-0.609375 c -0.671875,0 -0.875,-0.59375 -0.875,-1.140625 0,-1.25 1.015625,-2.296875 1.015625,-2.421875 0,-0.109375 -0.078125,-0.1875 -0.1875,-0.1875 -0.125,0 -0.203125,0.125 -0.265625,0.21875 -0.5,0.734375 -0.875,1.921875 -0.875,2.828125 0,0.6875 0.21875,1.421875 1.046875,1.421875 0.703125,0 1.171875,-0.5 1.53125,-1.046875 0.09375,0.578125 0.484375,1.046875 1.09375,1.046875 0.78125,0 1.25,-0.609375 1.609375,-1.359375 0.25,-0.484375 0.625,-1.84375 0.625,-2.453125 z m 0,0"
transform="translate(591.996,110.99)"
id="path2024" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -912,4 +912,217 @@ $$
\end{aligned}
$$
> Den spektrale utgangstettheten er produktet av den spektrale inngangstettheten og amplituderesponsen til filteret kvadrert.
> Den spektrale utgangstettheten er produktet av den spektrale inngangstettheten og amplituderesponsen til filteret kvadrert.
## Estimering
Mangler, kommer kanskje senere
## Design av digitale filter
Alle filtere beskrevet under kan lages med funksjonen `filterDesigner` i MatLab.
Digitale filtere brukes for å modifisere et signal i frekvensdomenet, eller i tidsdomenet.
Det kan forskyve signalet, forsterke/fjerne gitte frekvenser, fjerne støy og så videre.
Det finnes flere måter å implimentere et digitalt filter, men de to hovedtypene er FIR (Finite Impulse Response, Endelig impulsrespons) og IIR (Infinite Impulse Response, Uendelig impulsrespons).
De fem hovetypene av filter er:
* Lavpass
* Høypass
* Båndpass
* Båndstopp
* Allpass
Det ideelle lavpassfilteret har skarpe kanter ved knekkfrekvensen.
![Ideelt filter](figures/idealFilter.svg)
Impuls responsen til dette filteret er ikke kausal og har uendelig lengde, kompleksitet og forsinkelse.
Det er derfor ikke fysisk mulig å implimentere.
For å konstruere et filter, pleier man å finne løsningen med minst kompleksitet for gitte spesifikasjoner.
* Det vil forekomme små rippler i passbåndet
* Amplituden i stoppbåndet er ikke konstant
* Overgansbåndet (ved knekkfrekvensen) må ha en lengde.
Desto strammere spesifikasjonene er, desto mer komnplekst blir systemet.
Kausalt filter, med reelle verdier på formen:
$$ H(z) = \frac{b_0 + b_1 z^{-1} + \cdots + b_M z^{-M}}{1 + a_1 z^{-1} + \cdots + a_N z^{-N}} $$
### FIR mot IIR
FIR:
$$
\begin{gathered}
H(z) = \sum_{k=0}^{M-1} b_k z^{-k} \\
\Downarrow\\
y[n] = \sum_{k=0}^{M-1} b_k x[n-k]
\end{gathered}
$$
* Alltid stabile
* Kan oppnå lineær fase
* Enkelt å designe med lineære metoder
* Enkel å implimentere
IIR:
$$
\begin{gathered}
H(z) = \frac{\sum_{k=1}^{M-1} b_k z^{-k}}{1 + \sum_{k=0}^{N-1} a_k z^{-k}} \\
\Downarrow\\
y[n] = -\sum_{k=0}^{N-1} a_k y[n-k] + \sum_{k=0}^{M-1} b_k x[n-k]
\end{gathered}
$$
* Ferre parametere
* Mindre minne
* Lav forsinkelse
* Mindre komplese utregninger
* Typisk designet ved å transformere et analogt filter
### FIR
For at det skal være mulig å lage et lineært fast filter må ha en symmetrisk impulsrespons.
Det finnes fire alternativer, der lengden av impulsresponsen er $M$:
* Type I
* M er odd, og $h[n]$ er symmetrisk
* Type II
* M er lik, og $h[n]$ er symmetrisk
* Type III
* M er odd, og $h[n]$ er anti-symmetrisk
* Type IV
* M er lik, og $h[n]$ er anti-symmetrisk
For å designe et FIR filter, kan vi starte med ønsket spesifikasjon, $H(\omega)$, for å så finne impulsresponsen ved å invers foriertransformere.
Resultatet har typisk ikke en endelig lengde, så responsen må avgrenses (truncate).
Ved bruk av et rektangulært vindu, vil vi få den smaleste hovedloben, men mer sidelober (som ikke demper riktig), og den totale dempingen i stoppbåndet er ikke veldig stor.
#### Equiripple-design
En ulempe med vindumetoden er at du har lite kontroll over de kritiske frekvensene og dempingen i stoppbåndet.
Vi ønsker heller å desgine et filter som minimerer det maksimale avviket fra den ønskede spesifikasjonen.
##### MatLab
{% highlight matlab %}
E = [0 0.3 0.4 1];
A = [1 1 0 0];
M = 15;
B = firpm(M-1, E, A)
w = linspace(0,pi,500);
H = freqz(B,1,w);
figure
subplot(2,1,1),
stem(B);
subplot(2,1,2),
plot(w/pi,abs(H));
{% endhighlight %}
### IIR
Brukes mest for bevegende og rekursivt snitt.
Filteret har både poler og nuller.
$$ H(z) = \frac{\sum_{k=1}^{M-1} b_k z^{-k}}{1 + \sum_{k=0}^{N-1} a_k z^{-k}} $$
For en gitt filterorden, vil den kunne ha strammere spesifikasjoner enn FIR.
Finnes i hovedsak tre måter å designe et IIR filter på.
Man kan se på følgende:
* Systemfunksjonen
* Impulsresponsen
* Differensiallikninger
Videre ser vi på systemfunksjonen.
For å designe et IIR filter, er det ganske annerledes enn et FIR filter.
Prosessen er delt opp i fire deler:
1. Bestem filterspesifikasjoner $\{\omega_p, \omega_s, \delta_1, \delta_2\}$
2. Overfør spesifikasjonene til det analoge domenet. $\omega_p \rightarrow \Omega_p$ og $\omega_s\rightarrow \Omega_s$.
3. Design et analogt filter med motstander, kondensatorer, spoler osv, ved hjelp av Laplace transformasjonen $H(s)$.
4. Deretter bruker vi en funksjon $s=f(z)$ eller $H(z) = H(s)\|_{s=f(z)}$.
#### Bilinæer transformasjon
$$ s=\frac{2}{T}\frac{z-1}{z+1} \text{ eller } z=\frac{\frac{2}{T}+s}{\frac{2}{T}-s}$$
Dersom vi setter $s=\sigma+j\Omega$ og $z=e^j\omega$, får vi en transformasjon for frekvensene også.
$$
\begin{gathered}
\omega = 2 \arctan\frac{\Omega T}{2} \\
\text{eller} \\
\Omega = \frac{2}{T}\tan\frac{\omega}{2}
\end{gathered}
$$
I $s$-planet vil innsiden av sirkelen i $z$-planet være hele venste halvplan, eller 2. og 3. kvadrant.
Utsiden av sirkelen er hele høyre halvplan, eller 1. og 4. kvadrant.
Og enhetssirkelen vil være den imaginære aksen i $s$-planet.
Tre klasser med IIR filter:
##### Butterworth
* I MatLab: `butter`
* Ikke noe ripples i $\|H(\omega)\|$, maksimalt flatt
* Glattest overgang fra passbånd til stoppbånd
$$
\begin{aligned}
|H(\Omega)|^2 &= \frac{1}{1 + \left(\frac{\Omega}{\Omega_c}\right)^{2N}}\\
&= \frac{1}{1 + \epsilon^2 \left(\frac{\Omega}{\Omega_p}\right)^{2N}}
\end{aligned}
$$
Her ligger de $N$ polene i en sirkel med radius $\Omega_c$ i $s$-planet. Man velger $N$ basert på hvor flatt man ønsker filteret i passbånd og hvor fort den skal minke. Huskeregel er $-20$dB per dekad per andre filterorden $N$.
##### Chebyshev
* Finnes to typer, enten så er det ripples i passbånd, eller i stoppbånd
* I MatLab: `cheby1` (ripples i passbånd) og `cheby2` (ripples i stoppbånd)
Chebychev I:
$$
|H(\Omega)|^2 = \frac{1}{1 + \epsilon^2 T_N^2 \left(\frac{\Omega}{\Omega_c}\right)}
$$
Chebyshev II:
$$
|H(\Omega)|^2 = \frac{1}{1 + \frac{1}{\epsilon^2 T_N^2 \left(\frac{\Omega}{\Omega_c}\right)}}
$$
Der $T_N(x)$ er $N$-te ordens chebyshev poler. $\epsilon$ bestemmer hvor mye ripple det er i passbånd. Polene ligger på en ellipse i $s$-planet.
##### Elliptisk
* I MatLab: `ellip`
* Rippler i både stopp- og passbånd
* Skarpeste overgang fra pass- til stoppbånd
$$
|H(\Omega)|^2 = \frac{1}{1 + \epsilon^2 U_N^2\left(\frac{\Omega}{\Omega_c}\right)}
$$
Der $U_N$ er den $N$-te ordens Jacobi elliptiske funksjon.
$\epsilon$ bestemmer rippel i passbånd.
Dersom $N$ er et partall, vil det være mindre rippel i passbånd, men mer i stoppbånd.
For $N$ oddetall er det mer rippel i passbånd, men mye flatere i stoppbånd.