In the Name of God University of Tehran ECE Department Introduction to Signal processing using Simulink environment In this tutorial you will get familiar to use Simulink environment in order to do different signal processing functions on a signal. First we have to make a new Simulink model and set up the environment. In order to do so, if you run the MATLAB environment, you have to click on the Simulink icon: Figure 1: Slimulink library Then the Simulink library opens. On the library, you should click new, and your first model will be created! If you look at the Simulink library, there are many different blocks you can put in your model. Here, we want to hear our own voice. This microphone icon is inside the signal processing blockset which we are usually going to work with. The path to this block is shown in figure 2. You can drag and drop every icon from the library into your model. Figure 2: Simulink library and model creation Once you have done so, you can double click the icon you have placed in your model to view or edit its settings. For our case, the microphone: Figure 3: block properties You can simply click on the Help icon to see what each parameter does. Here, the sample rate is the number of samples taken in every second, the bits is the number of bits used to store your voice. Now we want to get familiar with some signal processing functions and the way we can implement them in Simulink: Filter Filters are the most well known signal processing functions. Filters can be designed in Simulink by using the FDATool, this tool can be found at: Simulink library>signal processing blockset>filtering>filter designs Or simply typing fdatool in the Matlab environment: >>fdatool Once the tool opens it looks like this: You can enter the desired parameters in the specific place and push the design filter button to design your filter. Then you can use the options on the bottom left hand corner to export them to your model. For example, the icon with [b,a] specifies the filter coefficients and the second from the top ( environment. ) creates a filter model in the Simulink Delay One of the most important operations on a signal is delaying it, this block can be found at: Simulink library>signal processing blockset>signal operation And looks like this . This is the basic element if you want to implement a filter manually. Down or Upsampling Another important signal processing operation is down or up sampling. Down sampling means that you discard some of the samples you have. For example if you down sample the signal by two, this means that you discard every other sample you have. So what's it good for? If you do not have enough space to store all your samples, you just need half memory space for storing! Of course it's not such a big deal, because you first have to see if this operation damages your signal or not. These operations can also be found at the same address as the delay block. Other important blocks There are some other useful important blocks that you may want to use. The first one is the spectrum analyzer which can be found at: Simulink library>signal processing blockset>signal processing sinks This block shows the frequency spectrum of the signal. Finally you can find simple blocks such as add, multiply, saturate,… blocks at: Simulink library>Simulink>commonly used blocks.