Showing posts with label to. Show all posts
Showing posts with label to. Show all posts

How to generate Digital Filter Coefficient and test the Filter in Matlab

| 0 comments |
This blog post shows how to generate a digital filter coefficient for a given input signal and then test the filter with impulse input signal.

Matlab has a two functions that are in a way inverse to each other. These function are prony and filter. The prony function generates Z transform of input signal with filter coefficient. The filter function generates output impulse response in response to given filter coefficients and input signal. Delta signal can be used with the filter coefficient to test the filter.

First generate some input signal like the following,

n = [0:50];
x = sin(2*pi*n/25);

Then use this signal x to determine filter coefficients a,b with the help of prony matlab function as follows,

[b,a] = prony(x,2,2);

The syntax of this function is,

[b,a] =prony{x,M,N)

where x is the input signal, M is the number of zeros and N is the number of poles

We can plot the input signal x as follows,

plot(n,x,*)

The plot is,


Now, we use the a,b coefficients generated above and check whether these filter coefficients generates the same output x in response to an input delta impulse.

Define delta signal to apply to the filter,

d = [1 zeros(1,50)];

Then apply this delta input to the filter using filter matlab function to get the filter response y,

y = filter(b,a,d);

Now plot y,



We see that when first x signal generated a and b coefficients and these coefficient were used for a filter we get the same signal back y for an input delta signal.

Indeed, we may plot both x and y on the same graph to see the result,

plot(n,x,*,n,y,o)

which gives,


So in this way we can use the prone and filter matlab functions to generate filter coefficients and later utilize them to build a digital filter. So these function are quite useful in Digital Signal Processing work using matlab.
Read More..

How to design Encoder using Verilog and VHDL

| 0 comments |
Encoder are used in communication system design to encode discrete data. They are found in source encoder, channel encoder as well as encryption of data. Decoder are used at the receiver to decode the encoded data. A simple encoder accepts 2^n inputs and outputs n bits, for example, if n is 3 then input is 8 bits. A truth table for 8x3 encoder is shown below.


This encoder truth table can be implemented using case, if or for statement. The case statement makes the code cleaner than with using if statement. The for statement finds more usefulness for larger encoder construct. 

Below are verilog and VHDL code using the case statements.

Encoder using case in VHDL

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity encoder is
    port(
    A : in unsigned(7 downto 0);
    Y : out unsigned(2 downto 0)
    );
end encoder;

architecture encoder_arch of encoder is
begin
    process(A)
    begin
        case A is
            when "00000001" => Y <= "000";
            when "00000010" => Y <= "001";
            when "00000100" => Y <= "000";
            when "00001000" => Y <= "001";
            when "00010000" => Y <= "000";
            when "00100000" => Y <= "001";
            when "01000000" => Y <= "000";
            when "10000000" => Y <= "001";
            when others => Y <= "XXX";
        end case;
    end process;
end encoder_arch;

Encoder using case in Verilog

 module encoder(A,Y);
    input [7:0] A;
    output [2:0] Y;
    reg [2:0] Y;
  
    always@(A)
        begin
            casex(A)
                8b00000001 : Y = 0;
                8b00000010 : Y = 1;
                8b00000100 : Y = 2;
                8b00001000 : Y = 3;
                8b00010000 : Y = 4;
                8b00100000 : Y = 5;
                8b01000000 : Y = 6;
                8b10000000 : Y = 7;
                default : Y = 3bX;
            endcase
        end
    endmodule

The verilog code is shorter than the VHDL code for this case statement.
Read More..

Download Dead To Right Full Version

| 0 comments |
Bismillah. Selamat sore semuanya. Kesempatan kali ini saya akan update artikel blog saya mengenai game. Setelah sebelumnya kemarin saya mengupdate film The Woman in Black, sekarang saya akan kembali mengupdate game lagi. Terakhir saya posting artikel di blog saya ini mengenai game yaitu game lama yang berjudul Resident Evil 3 : Nemenis. Untuk kali ini saya membahas dan membagikan game yang berbasic action ini. Walaupun game ini terlihat game yang berat atau yang mempunyai spesifikasi tinggi, jangan salah dulu game ini termasuk game ringan. Jangan dipikir ini game ringan kualitas gambarnya juga tidak bagus, grafik dari game ini sudah dibilang lebih dari cukup untuk kalangan game yang berspesifikasi sama seperti ini. Game yang berjudul Dead To Right ini menceritakan seorang polisi yang bekerja membunuh para penjahat dan menyelamatkan para sandra. Pasti seru kan membaca sekilas tentang game ini? Apa masih ada yang belum mengerti tentang game ini? Pokoknya intinya  kita dituntut untuk segera melepaskan semua tahanan yang disandera. Screenshot dari game ini bisa dilihat di bawah.



Untuk yang ingin tahu minimum system requirementnya bisa di cek dibawah :

  • System:Pentium III 500 MHz or equivalent
  • RAM:128 MB
  • Video Memory:16 MB
  • Hard Drive Space:600 MB
Download Dead To Right Full Version | Mediafire | 177 MB | (.exe)
If required password : www.metal-xp.net

Sekian postingan artikel pada kesempatan kali ini. Jika link rusak segera dilaporkan.
Terima Kasih! Semoga Bermanfaat!

Source : http://www.metal-xp.net/2012/04/dead-to-right-mediafire.html
Read More..

Add your voice to Facebook Twitter and your blog with Cinchcast

| 0 comments |
Post audio on Facebook and Twitter 


Cinch is a free and easy way to create and share audio, text and photo updates using your phone or computer. Cinch enables you to capture and report on your experiences in a way that simple text just cant do. Using a simple interface, you can make and broadcast your content creations through Facebook, Twitter, CinchCast and more.


     How To Use      

Step 1 : Login to CinchRegister for a Cinch account, or just login using your current Facebook or Twitter account, to begin creating content.
Step 2 : Create and share audio, text and photo updates all in one place using CinchCast
Step 3 : Organize and save all your favorite cinches in albums that people can easily follow.
Step 4 : Enjoy.


Free
Home Page
Read More..