|
From: | Przemek Klosowski |
Subject: | Re: Butter Command - Maximum Order and Cut Off Frequency - Issues |
Date: | Fri, 19 Jan 2018 11:57:17 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/18/2018 06:56 PM, Shadders wrote:
Code that replicates failure - simple ================================= nc = 5; % Number of cycles of the waveform fs = 192000; ts = 1/fs; n = 0:192000; % Variable used for indexing x = zeros(1, length(n)); % Input signal initialisation [b,a] = butter(12, 0.98); % Create the butterworth response k1 = fs/1000; k1n=0:(nc*k1); x1k = sin(2*pi*k1n/k1); x(1, 1000:1000+length(x1k)-1) = x1k; y = filter(b, a, x); % Use the filter function figure(1); plot(n, y) =================================
There's an interesting numerical instability around 0.972:for d=0.96+[.010:.0001:.015]; [b,a] = butter(12,d ); y = filter(b, a, x); plot(n(500:3600), y(500:3600)),title(d); d,pause(.5); end
I have no idea what is going on but it's kind of pretty :)
[Prev in Thread] | Current Thread | [Next in Thread] |