 Learning DSP for programming as a hobby.

## Re: Radar: Polar to cartesian conversion.

Conversion is quite simple -https://en.wikipedia.org/wiki/Polar_coordinate_sys...#include <iostream>// helpful source: https://www.mathsisfun.com/polar-cartesian-coordin...#include...

## Re: Applications for a new FFT algorithm

LFT is also known as an acronym for Logarithmic Fourier Transformation  https://www.complete-mt-solutions.com/users/ajones...

Is it that you have some coefficients for lets say 44.1kHz filter but you don't know how they are calculated? If situation is this and those coefficients are calculated...

Your A-Weighting filter is maybe std BLT implementation and therefore has some error in response at high frequency area :Dunno if your issue relates to this difference...

## Re: I/Q samples with Matlab

You acceped an answer at dsp.stackexchange.com

## Design FIR filters using DRHS-OLL algorithm

Bumped to research paper Efficient FIR Filter Design Methodology Using Dynamic Regional Harmony Search Algorithm With Opposition And Local Learning (DRHS-OLL)...

## Re: Help with polynomial zeros

Have you tried FIR design methods like DRHS-OLL? https://www.researchgate.net/publication/286672378...http://mistis.inrialpes.fr/people/forbes/PAPERS/GE...

## Re: Is there any reliable implementation method of IIR filters with pole positions very close to the unit circle?

Signal Processing Magazine, March 2009, at Rick Lyons' "DSP Tips and Tricks"

## Re: Combining two wave generation formulas not working as expected (MATLAB/OCTAVE)

Yes, now it looks working as intended. I had put variable t in a wrong position... . Thank you very much.

## Re: Combining two wave generation formulas not working as expected (MATLAB/OCTAVE)

Thanks, it could work that way as it does in Desmos sheet but, I need to specify the fundamental frequency f0 at some point in both sections (triangle and square)...

## Combining two wave generation formulas not working as expected (MATLAB/OCTAVE)

I'm trying to convert Mathematica sawtooth wave calculation formula to Octave/Matlab language. Here are the original formulas. My Desmos take is here.  I've got...

## Re: Matlab Basic Functions Reference (pdf)

Matlab -> Python(NumPy), R - http://mathesaurus.sourceforge.net/matlab-python-x...

## Re: LFT

Thanks for the reply. I've found one speed comparison so far and it shows really good result against FFT:Full source code, for task I would like to try LFT/ILFT...

## Re: LFT

Yes. BTW, R = 'R = [R1 R2] where R1 is analog filter response (abs(R1).^2) from range 0:pi and R2 is response (abs(R2).^2) of same filter from range pi:0Edited...

## LFT

I have this code (Octave):  % obtain impulse response using cepstral processing h = log(R); % R^(k) (R=magnitude squared response) h = ifft(h); % complex...

## NI LabVIEW Community Edition

FYI,The LabVIEW and LabVIEW NXG Community edition is free for non-commercial use.

## Re: Matlab/Octave loop vectorization

Thank you very much! My for-loop code took over one hour to get result (also seemed to use one core only) ... your code gave result immediately.

## Matlab/Octave loop vectorization

My Octave source code:pkg load signal clear all; N=20; fs=44100; f=1000; w=2*pi*f; t=0:1/fs:1              % 1 second % RAW square wave w_sqr = square(w*t);         ...

## Re: Bessel filter design

But I using these factor to calculate the pole of the Bessel filterMaybe some lines of code of your calculations could be helpful ...?

## Re: Digital Filters that have prescribed phase shift

On Octave, save as an image file (.png seems to work) and upload withfeature...

## Re: Digital Filters that have prescribed phase shift

Usually there are only certain type files allowed to upload.Which type your file is (ascii, binary).

## Re: Digital Filters that have prescribed phase shift

Sorry, I don't seem to know how to attach a file.Use for file upload operation.

## Re: A-Weighting filter

That's much easier to implement compared to Magnitude Invariance Method!What comes to submitting PDF ... doesn't that file inserting (paperclip symbol) feature...

## A-Weighting filter

A-Weighting filter implemented here uses Bilinear transformation method, which has some issues at high frequency area. Here's one alternative I made using Octave:<code>%...

## Re: Curve Modelling

I usually try 1st with Wolfram|Alpha

## Re: What is the cost of a typical MSEE degree?

Here (Finland) tuition is commonly 0€/semester (some private academy may have tuition) and state benefits (depends on martial status) for a (single) student are:housing...

## “Improved” MZT/IIM type One pole LPF

Some time ago, while playing with all kind of approximations of common math functions, I came up to this idea to use a low degree Taylor polynomial for to calculate...

## Re: Problem with 1st order Massberg LPF

Thanks a lot, you're right. This change fixes the problem.

## Problem with 1st order Massberg LPF

I'm trying to implement this filter in title by following the book "Designing Audio Effect Plug-Ins in C++" By Will Pirkle Problem I'm facing is the magnitude...

...

## Re: Parallel and series connection, what difference it makes

This was just a technical question (I'm not EE so ...) but, I also tested by feeding normal audio stream through these filters one at time (both worked as expected...

## Re: Parallel and series connection, what difference it makes

Your commands give these results in Octave:Cascade:Parallel:When those two filters are used either parallelly or in series, shouldn't I be able to hear the -10dB...

## Parallel and series connection, what difference it makes

Hi!Lets assume you have two 1st order IIR filters: [b1 b2 a1 a2] 1 = [ 1 -1 -1 -1]  2 = [-1 -1 -1 1]What difference in phase and magnitude responses it makes when...

## Re: What is the reason for this 'linear error'

When the resulting LPF order is 3 or more this issue in discussion is not present anymore:(numofsamples=4096, fs=44.1kHz, fc=1...N Hz) --> could it just be so...

## Re: What is the reason for this 'linear error'

I quess the functionality behind the issue can be found from cepstral processing block ... there's a line with remark: "% minimum phase sequence r^mn" which changes...

## Re: What is the reason for this 'linear error'

One more note: Decreasing the value of numofsamples parameter improves response at lower fc (and vice versa) ?

## Re: What is the reason for this 'linear error'

Looks like the 1st image showing the error was not present anymore? I added it and also added some Octave code which I used in making the LP filters and 1st plot. Matlab...

## What is the reason for this 'linear error'

Hi!Here's MIM (Magnitude Invariance Method) paper (press the "View PDF" to get the paper/matlab code in hands) and here's a plot showing the issue I'm trying to...

## Re: OFDM

Your plot data: Ber = 0.0000e+000  0.0000e+000  0.0000e+000  0.0000e+000  0.0000e+000  0.0000e+000  1.0017e-005I tried by using plot(EbN0,Ber) and it looked...

## Re: OFDM

Your .m code looks like a mess without proper formatting. At that point you paste the source code to your post you be able to use code formatting feature to keep...

## Re: OFDM

Hmm... your code needs formatting (did you try code formatting option (2nd icon from left))?

## Re: Correct transfer function with 1st order IIR filter

AFAIK, software I mentioned uses float math so I'll check if this gives any issues.EDIT: At least SynthEdit made no difference after reducing the accuracy.

## Correct transfer function with 1st order IIR filter

What diffreneces it makes in magnitude and/or phase response when using H(z) = (b0 + b1*z^-1 + b2*z^-2)/(a0 + a1*z^-1 + a2*z^-2) by adding b2=0, a2=0 instead...

## Re: Invert Phase Response

Thanks!Yes, I'll have to double check if the adopted RBJ's cookbook design is correctly implemented in my script.Script I'm using for plots is originally done for...

## Re: Invert Phase Response

Hi, and thanks for the reply.RBJ's EQ Cookbook paper - http://www.musicdsp.org/files/Audio-EQ-Cookbook.tx...With "turn" I mean "invert" (turn 180 degrees if one...

## Invert Phase Response

I prepared a 2nd order Peak filter (fs=44.1kHz, fc=20kHz, Q=0.089084, Gain=12dB) using RBJ's cookbook formula (+ additional Q pre-warping) which results these...

## Re: Higher order filter from 1st and 2nd order design

AFAIK, higher order filter gives more options for to match the magnitude response follow closer the analog prototype response (I've faced the limits of 2nd order...

## Re: Higher order filter from 1st and 2nd order design

I suppose preserving roll-off and slope are the main targets ... kind of 1st or 2nd order filter but few additional poles/zeros (or a/b coefficients) for to tweak...

## Re: Higher order filter from 1st and 2nd order design

Thanks, I'll check your example case. I was planning to have this working with all filter types RBJ's Audio EQ Cookbok presents.

IIR

## Higher order filter from 1st and 2nd order design

I'm trying to implement higher order digital filter from 2nd order design (without using some ready to use method as like MIM for the job): H(s) = w0^2 / (s^2 +...

## Re: Matlab - How to plot magnitude error

As mentioned above I'm not familiar with Octave/Matlab. I tried to find some freqz/freqs based solutions (example code) matching with this subject but, all those...

...

## Matlab - How to plot magnitude error

I'm trying to plot the magnitude (and phase) response error between an analog filter and digital filter. I have this code:%pkg load signal %pkg load control fs...

## Re: MIM and PIM

OK, it looks like there are some problems in magnitude response when fs is increased and/or when fc is reduced:At 44.1kHz sampling when fc is set to 20Hz, situation...

## Re: MIM and PIM

OK. Some progression with MIM. 2nd order MIM LPF results looks great for selected cutoff frequency (fs = 44.1kHz) as seen in plot (frequency range upto 23873Hz):Coefficients...

## Re: MIM and PIM

OK, some progress.Tried the MIM method for 2nd order - LP filter (fs=44100/f0=15000/Q=0.707) and - peak filter (fs=44100/f0=10000/Q=0.707/db=6). Here are the plots:Magnitude...

## Re: Prewarping Fc, Q or both

Thanks for answering here too.I did plot the peak filter build through cookbook's "case BW" instead of "case Q". It gave better magnitude response. 'Prewarping'...

## Re: Prewarping Fc, Q or both

Is there a way prevent this forum software from shrinking the image (original is W=1752px X H=1513px)? I'll add link to some picture sharing site.Abbreviation 'EE'...

## Prewarping Fc, Q or both

RBJ's Audio EQ cookbook takes into account only frequency prewarping when filter is build using case Q for bandwidth. Why not Q prewarping as well with some of those...

## Re: MIM and PIM

I ran the Matlab listings from paper (needed some modifications) but got only the MIM plot 'correctly' (not exact figures compared to paper): In original Matlab...

## Re: MIM and PIM

Thanks!So far I've got info that any algorithm that relies on cepstral methods does not work if the analog transfer function is zero at any point.Actually, instead...

## Re: MIM and PIM

Paper can be found from here (soar.wichita.edu -link).

## MIM and PIM

Any open source (C/C++/matlab/octave/...) implementations based on this paper available (paper is hebrea for me ... a language I don't understand a word ;) )?

Thanks! My english is maybe taking to somewhere not indended. 'Analog model' I'm comparing filter response against isn't actually analog but calculations of magnitude...

Thanks, I'll check those methods.

I would like to try optimize a bit more the biquad filters indended for low samplerates (44.1/48kHz). Here's the data: fs = 44100.0; p1 = exp(-1.0/(fs*3180e-6)) p2...

## Re: s_to_z (Pupalaikis)

One more question. Now when you use rad/sec units there in 1-4, does it mean it has to be same units all the way (i.e. in s_to_z() call as well)?

## Re: s_to_z (Pupalaikis)

Thanks! As I mentioned already I'm not good with math/DSP so, I would try your suggestion as well but ... there are few unknown variables in those equations which ones...

## Re: s_to_z (Pupalaikis)

Thank you very much for taking your time and explaining this process with an example. As my math/DSP skills are not very good, those equations found on papers looks...

## Re: s_to_z (Pupalaikis)

Thanks. So far I'm not familiar with other but MZT so be patient...1. done2. done3. how's this done? 4. do you mean exp(something) or H = {s^2-s*(z1+z2)+z1*z1}/{s^2-s*(p1+p2)+p1*p2} ?5....

## Re: s_to_z (Pupalaikis)

Thanks. That's a handy tool in many tasks. Hopefully it works in octave. I need a solution for real time calculations so it does not give the answer for my query....

## s_to_z (Pupalaikis)

Paper: Bilinear Transformation Made Easy - http://documents.mx/documents/easybilinearpdf.htmlExample of implementation - http://codepad.org/u3tvKn0SI get the same...

Use this form to contact jtp_1960

Before you can contact a member of the *Related Sites:

• You must be logged in (register here)
• You must confirm you email address