# Producing Colored Noise from a given PSD Data

I need to estimate (extract/produce) the colored noise of a given PSD Data. I have the following procedure to get the desired results.

1. First of all I calculate the filter coefficiencts using firls command in MATLAB by implementing Helbert Transform firls(filter_order,norm_freq,signal,'hilbert'), the problem I face is to choose the right order for the filter, I am at the moment working with hit and trial method and rougly a value of around 400 is selected which fits quite well with the PSD curve.
2. Secondly the white noise is passed to this filter and further amplified with a power amp. PSD of the extracted noise is again calculted and matched with the input PSD.

I want to know if this way is alright or not, moreover for passing white noise through the filter I am using Simulink, is there a way not to use time varibales and directly calculate the colored noise. In other word if I have to get rid of Simulink block. I tried to work with lsim and I can get to colored noise but it's amplitude is lesser and I am not sure how can I amplify the output signal so that it matches the input PSD.

just a short flow:

INPUT PSD --> Filter Coefficient Calculated --> White Noise Passed Through Filter --> Colored Noise at a lower amplitude extracted --> Amplified --> PSD of Colored Noise Calculated --> INPUT PSD matched with OUTPUT PSD

• So your question is if that is the right way to make colored noise, and how to not reduce the power of the colored noise? Dec 11, 2012 at 14:57
• Hi Jim, That is my question. 1. How to choose the right filter order (optimal) adaptivly 2. If somehow the power is reduced anyways what are the ways to increase the power. Dec 11, 2012 at 15:11
• Why do you need to change the filter? Does the "coloring" that you need change with time? Dec 11, 2012 at 15:58
• the input PSD data is changing for differnt applications. It will be part of a toolbox and everytime there will be a new data sample Dec 12, 2012 at 18:29