Speaker Recognition System

October 29, 2009 by Luigi Rosa · Leave a Comment
Filed under: Sound technology 
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)

.: Click here to download :.

Speaker recognition is the process of automatically recognizing who is speaking on the basis of individual information included in speech waves. This technique makes it possible to use the speaker’s voice to verify their identity and control access to services such as voice dialing, banking by telephone, telephone shopping, database access services, information services, voice mail, security control for confidential information areas, and remote access to computers.

Speaker identity is correlated with the physiological and behavioral characteristics of the speaker. These characteristics exist both in the spectral envelope (vocal tract characteristics) and in the supra-segmental features (voice source characteristics and dynamic features spanning several segments).

The most common short-term spectral measurements currently used are Linear Predictive Coding (LPC)-derived cepstral coefficients and their regression coefficients. A spectral envelope reconstructed from a truncated set of cepstral coefficients is much smoother than one reconstructed from LPC coefficients. Therefore it provides a stabler representation from one repetition to another of a particular speaker’s utterances. As for the regression coefficients, typically the first- and second-order coefficients are extracted at every frame period to represent the spectral dynamics. These coefficients are derivatives of the time functions of the cepstral coefficients and are respectively called the delta- and delta-delta-cepstral coefficients.

Index Terms: speaker, recognition, verification, sound, words.

Figure 1. Microphone

A simple and effective source code for Speaker Recognition. This code is based on Amin Koohi’s excellent submission available here and improves results using an advanced metric for distance computation. In this way a better recognition rate is achieved. On the initial dataset (8 speakers) we obtain a recognition rate of 100% (the previuos one was 87.5%). We can achieve analogous results (100% recognition rate) for a larger dataset (11 speakers).

Demo code (protected P-files) available for performance evaluation. Matlab Signal Processing Toolbox is required.
Release
Date
Major features
1.0

2005.12.07

We recommend to check the secure connection to PayPal, in order to avoid any fraud.
This donation has to be considered an encouragement to improve the code itself.

Speaker Recognition System – Release 1.0 – Click here for your donation. In order to obtain the source code you have to pay a little sum of money: 26 EUROS (less than 36,4 U.S. Dollars).
Once you have done this, please email us luigi.rosa@tiscali.it
As soon as possible (in a few days) you will receive our new release of Speaker Recognition System.

Alternatively, you can bestow using our banking coordinates:

Name :
Luigi Rosa
Address :
Via Centrale 35 67042 L’Aquila Italy
Bank name:
Poste Italiane
Bank address:
Viale Europa 190 00144 Roma Italy
IBAN (International Bank Account Number) :
IT-50-V-07601-03600-000058177916
BIC (Bank Identifier Code) :
BPPIITRRXXX

The authors have no relationship or partnership with The Mathworks. All the code provided is written in Matlab language (M-files and/or M-functions), with no dll or other protected parts of code (P-files or executables). The code was developed with Matlab 14 SP1. Matlab Signal Processing Toolbox is required. The code provided has to be considered “as is” and it is without any kind of warranty. The authors deny any kind of warranty concerning the code as well as any kind of responsibility for problems and damages which may be caused by the use of the code itself including all parts of the source code.

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Writing Fast Matlab Code #5:Vectorization

October 27, 2009 by Pascal Getreuer · Leave a Comment
Filed under: Code Optimization, Tutorials 
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)

Writing Fast Matlab code

A  computation is vectorized  by  taking  advantage of vector  operations.   A  variety   of programming situations can be vectorized,  and often improving  speed to 10 times faster or even better. Vectorization is one of the most general and effective techniques  for writing  fast M-code.

Vectorized Computations

Many  standard Matlab functions  are  “vectorized”:  they  can operate  on an  array  as if the  function had been applied  individually  to every element.

>> sqrt([1,4;9,16])
 
>> abs([0,1,2,−5,−6,−7])
 
ans  =
 
1           2
 
3           4
 
ans  =
 
0           1            2            5           6            7

Consider  the following function:

function d  =  minDistance(x,y,z)
 
%   Find the  min   distance  between a set  of points  and the origin
 
nPoints =  length(x);
 
d  =  zeros(nPoints,1);                         %   Preallocate
 
for k  =  1:nPoints                             %   Compute  distance for every point d(k) =  sqrt(x(k)ˆ2 +  y(k)ˆ2 +  z(k)ˆ2);
 
end
 
d  =  min(d);                                         %   Get the  minimum   distance

For  every  point,   its  distance   from  the  origin  is computed and  stored  in  d.   For  speed,  array  d is preallocated (see Section 3).  The minimum  distance  is then  found with min. To vectorize  the distance

computation, replace the for loop with vector  operations:

function d  =  minDistance(x,y,z)
 
%   Find the  min   distance  between a set  of points  and the origin
 
d  =  sqrt(x.ˆ2 +  y.ˆ2 +  z.ˆ2);            %   Compute  distance for every point d  =  min(d); %   Get the  minimum   distance

The  modified code performs  the  distance  computation with  vector  operations.  The  x, y and  z arrays are first squared  using the per-element power operator, .^ (the per-element operators for multiplication and  division  are  .* and  ./).  The  squared  components  are  added  with  vector  addition.  Finally,  the square  root  of the  vector  sum  is computed per  element,  yielding  an  array  of distances.    (A  further improvement: it is equivalent to compute  d = sqrt(min(x.^2 + y.^2 + z.^2))).

The  first  version  of the  minDistance program  takes  0.73 seconds  on  50000 points.    The  vectorized version takes  less than  0.04 seconds, more than  18 times faster.

Some useful functions  for vectorizing  computations:

min, max, repmat, meshgrid, sum, cumsum, diff, prod, cumprod, accumarray

Vectorized  Logic

The  previous  section  shows how to  vectorize  pure  computation.  But  bottleneck code often  involves conditional logic. Like computations, Matlab’s logic operators are vectorized:

<pre lang="matlab" escaped="true">>> [1,5,3] < [2,2,4]
 
ans  =
 
1           0            1

Two  arrays  are  compared  per-element.  Logic operations return “logical”  arrays  with  binary  values. How is this useful?  Matlab has a few powerful functions  for operating  on logical arrays:

>> find([1,5,3] < [2,2,4])  %   Find indices  of nonzero elements
 
ans  =
 
1           3
 
>> any([1,5,3] < [2,2,4])   %   True if any element of a vector is  nonzero
 
%   (or per−column for  a matrix)
 
ans  =
 
1
 
>> all([1,5,3] < [2,2,4])   %   True if all elements of a vector  are  nonzero
 
%   (or per−column for  a matrix)
 
ans  =
 
0

Vectorized  logic also works on arrays.

>> find(eye(3) ==  1)                 %   Find which elements  ==  1  in the 3x3   identity  matrix ans  =
 
1         %   (element  locations  given as indices)
 
5
 
9

By default,  find returns element locations  as indices (see page 16 for indices vs. subscripts).

Example 1:  Vector Normalization

To normalize  a single vector  v to unit  length,  one can use v = v/norm(v).  However, to use norm for set of vectors  v(:,1), v(:,2), . . . requires computing  v(:,k)/norm(v(:,k)) in a loop.  Alternatively,

vMag  =  sqrt(sum(v.ˆ2));
 
v  =  v./vMag(ones(1,size(v,1)),:);

Example 2:  Removing elements

The  situation often arises where array  elements  must  be removed  on some per-element condition.   For example,  this code removes all NaN and infinite elements  from an array  x:

i =  find(isnan(x)  |  isinf(x));                    %   Find bad elements  in  x x(i) =  []; %   and delete  them

Alternatively,

i =  find(˜isnan(x) &   ˜isinf(x));  %   Find elements that  are not NaN  and not  infinite x  =  x(i);           %   Keep   those elements

Both  of these solutions  can be further  streamlined by using logical indexing:

x(isnan(x) | isinf(x))  =  [];                %   Delete  bad elements

or

x  =  x(˜isnan(x) &   ˜isinf(x));                    %   Keep   good elements

Example 3:  Piecewise functions

The sinc function  has a piecewise definition,

sinc(x) =
 
( sin(x)/x,   x = 0
 
1,                    x = 0

This code uses find with vectorized  computation to handle  the two cases separately:

function y  =  sinc(x)
 
%   Computes  the sinc function per−element for a set  of x  values.
 
y  =  ones(size(x));                          %   Set y  to all ones,  sinc(0) =  1 i =  find(x ˜= 0);            %   Find nonzero x  values
 
y(i) =  sin(x(i)) ./ x(i);                %   Compute  sinc  where x  ˜=  0

A concise alternative is y = (sin(x) + (x == 0))./(x + (x == 0)).

Example 4:  Drawing images with meshgrid

The  meshgrid function  takes  two input  vectors  and  converts  them to matrices  by replicating  the  first over the rows and the second over the columns.

>> [x,y] =  meshgrid(1:5,1:3)
x  =

y  =

1

2

3

4

5 1

1

1

1

1
1

2

3

4

5 2

2

2

2

2
1

2

3

4

5 3

3

3

3

3

The  matrices  above work like a map  for a width  5, height 3 image.  For each pixel, the  x-location  can be read  from x and  the  y-location  from y. This  may seem like a gratuitous use of memory  as x and  y simply record the column and row positions,  but  this is useful.  For example,  to draw an ellipse,

FastMatlabcode5_1

%Create x  and y  for  a width 150, height  100   image
 
[x,y] =  meshgrid(1:150,1:100);
 
%   Ellipse  with origin (60,50) of size  15   x  40
 
Img   =  sqrt(((x−60)2  / 15ˆ2) +  ((y−50)2  / 40ˆ2)) > 1;
 
%   Plot  the  image
 
imagesc(Img); colormap(copper);
 
axis image,  axis off

Drawing  lines is just  a change in the formula.

Drawing a line

[x,y] =  meshgrid(1:150,1:100);
 
%   The   line y  =  x*0.8 +  20
 
Img   =  (abs((x*0.8 +  20) − y) > 1);
 
imagesc(Img); colormap(copper);
 
axis image,  axis off

Polar  functions  can be drawn  by first converting  x and y variables  with the cart2pol function.

Drawing a polar function

[x,y] =  meshgrid(1:150,1:100);
<table border="0" cellspacing="0" cellpadding="0">
<tbody></tbody></table>
[th,r] =  cart2pol(x − 75,y − 50);   %   Convert to polar
 
%   Spiral centered at (75,50) Img   =  sin(r/3 +  th);
 
imagesc(Img); colormap(hot);
 
axis image,  axis off

Example 5:  Polynomial interpolation

Given n points x1 , . . . xn and corresponding  function  values y1 , . . . yn , the coefficients c0 , . . . , cn−1 of the interpolating polynomial

Interpolation fast Matlab code_0

can be found by solving:

Interpolation fast Matlab code_1

function  c =  polyint(x,y)
 
%   Given a set  of points  and function  values x  and y,
 
%   computes the interpolating  polynomial.
 
x  =  x(:);                                                                   %   Make  sure x  and y  are  both column vectors y  =  y(:);
 
n  =  length(x);                                                        %   n  =  Number   of points
 
%   Construct the matrix on   the left−hand−side
 
xMatrix =  repmat(x, 1, n);                                  %   Make  an n  by   n  matrix with x  on   every  column powMatrix =  repmat(n−1:−1:0,  n, 1);                                          %   Make  another n  by   n  matrix of exponents
 
A  =  xMatrix .ˆ powMatrix;                                      %   Compute the  powers
 
c =  A\y;                                                                      %   Solve matrix equation  for coefficients

The  strategy to  construct the  left-hand  side matrix  is to  first  make  two  n×n matrices  of bases  and exponents  and then put them together  using the per element power operator, .^ . The repmat function (“replicate matrix”) is used to make the base matrix  xMatrix and the exponent matrix  powMatrix.

Interpolation fast Matlab code_2

The xMatrix is made by repeating  the column vector  x over the columns n times.  The powMatrix is a row vector  with elements  n − 1, n − 2, n − 3, . . . , 0 repeated down the  rows n times.  The  two matrices could also have been created  with [powMatrix, xMatrix] = meshgrid(n-1:-1:0, x).

The code above is only an example—use  the standard polyfit function  for serious use.

Download Full Pdf Version

Vectorization

A computation is vectorized by taking advantage of vector operations. A variety of programming situations can be vectorized, and often improving speed to 10 times faster or even better. Vectorization is one of the most general and effective techniques for writing fast M-code.

5.1 Vectorized Computations

Many standard Matlab functions are vectorized”: they can operate on an array as if the function had been applied individually to every element.


>> sqrt([1,4;9,16])


>> abs([0,1,2,5,6,7])



ans =

1 2

3 4


ans =


0 1 2 5 6 7


Consider the following function:

function d = minDistance(x,y,z)

% Find the min distance between a set of points and the origin

nPoints = length(x);

d = zeros(nPoints,1); % Preallocate

for k = 1:nPoints % Compute distance for every point d(k) = sqrt(x(k)ˆ2 + y(k)ˆ2 + z(k)ˆ2);

end

d = min(d); % Get the minimum distance

For every point, its distance from the origin is computed and stored in d. For speed, array d is preallocated (see Section 3). The minimum distance is then found with min. To vectorize the distance

computation, replace the for loop with vector operations:

function d = minDistance(x,y,z)

% Find the min distance between a set of points and the origin

d = sqrt(x.ˆ2 + y.ˆ2 + z.ˆ2); % Compute distance for every point d = min(d); % Get the minimum distance

The modified code performs the distance computation with vector operations. The x, y and z arrays are first squared using the per-element power operator, .^ (the per-element operators for multiplication and division are .* and ./). The squared components are added with vector addition. Finally, the square root of the vector sum is computed per element, yielding an array of distances. (A further improvement: it is equivalent to compute d = sqrt(min(x.^2 + y.^2 + z.^2))).

9


The first version of the minDistance program takes 0.73 seconds on 50000 points. The vectorized version takes less than 0.04 seconds, more than 18 times faster.

Some useful functions for vectorizing computations:

min, max, repmat, meshgrid, sum, cumsum, diff, prod, cumprod, accumarray

5.2 Vectorized Logic

The previous section shows how to vectorize pure computation. But bottleneck code often involves conditional logic. Like computations, Matlab’s logic operators are vectorized:

>> [1,5,3] < [2,2,4]

ans =

1 0 1

Two arrays are compared per-element. Logic operations return “logical” arrays with binary values. How is this useful? Matlab has a few powerful functions for operating on logical arrays:

>> find([1,5,3] < [2,2,4]) % Find indices of nonzero elements

ans =

1 3

>> any([1,5,3] < [2,2,4]) % True if any element of a vector is nonzero

% (or per−column for a matrix)

ans =

1

>> all([1,5,3] < [2,2,4]) % True if all elements of a vector are nonzero

% (or per−column for a matrix)

ans =

0

Vectorized logic also works on arrays.

>> find(eye(3) == 1) % Find which elements == 1 in the 3x3 identity matrix ans =

1 % (element locations given as indices)

5

9

By default, find returns element locations as indices (see page 16 for indices vs. subscripts).

10


Example 1: Vector Normalization

To normalize a single vector v to unit length, one can use v = v/norm(v). However, to use norm for set of vectors v(:,1), v(:,2), . . . requires computing v(:,k)/norm(v(:,k)) in a loop. Alternatively,

vMag = sqrt(sum(v.ˆ2));

v = v./vMag(ones(1,size(v,1)),:);

Example 2: Removing elements

The situation often arises where array elements must be removed on some per-element condition. For example, this code removes all NaN and infinite elements from an array x:

i = find(isnan(x) | isinf(x)); % Find bad elements in x x(i) = []; % and delete them

Alternatively,

i = find(˜isnan(x) & ˜isinf(x)); % Find elements that are not NaN and not infinite x = x(i); % Keep those elements

Both of these solutions can be further streamlined by using logical indexing:

x(isnan(x) | isinf(x)) = []; % Delete bad elements

or

x = x(˜isnan(x) & ˜isinf(x)); % Keep good elements


Example 3: Piecewise functions

The sinc function has a piecewise definition,

sinc(x) =


( sin(x)/x, x = 0

1, x = 0


This code uses find with vectorized computation to handle the two cases separately:

function y = sinc(x)

% Computes the sinc function per−element for a set of x values.

y = ones(size(x)); % Set y to all ones, sinc(0) = 1 i = find(x ˜= 0); % Find nonzero x values

y(i) = sin(x(i)) ./ x(i); % Compute sinc where x ˜= 0

A concise alternative is y = (sin(x) + (x == 0))./(x + (x == 0)).

11


Example 4: Drawing images with meshgrid

The meshgrid function takes two input vectors and converts them to matrices by replicating the first over the rows and the second over the columns.

>> [x,y] = meshgrid(1:5,1:3)

x =

y =

1

2

3

4

5

1

1

1

1

1

1

2

3

4

5

2

2

2

2

2

1

2

3

4

5

3

3

3

3

3

The matrices above work like a map for a width 5, height 3 image. For each pixel, the x-location can be read from x and the y-location from y. This may seem like a gratuitous use of memory as x and y simply record the column and row positions, but this is useful. For example, to draw an ellipse,

% Create x and y for a width 150, height 100 image

[x,y] = meshgrid(1:150,1:100);

% Ellipse with origin (60,50) of size 15 x 40

Img = sqrt(((x60).ˆ2 / 15ˆ2) + ((y50).ˆ2 / 40ˆ2)) > 1;

% Plot the image

imagesc(Img); colormap(copper);

axis image, axis off

Drawing lines is just a change in the formula.

[x,y] = meshgrid(1:150,1:100);

% The line y = x*0.8 + 20

Img = (abs((x*0.8 + 20) y) > 1);

imagesc(Img); colormap(copper);

axis image, axis off

Polar functions can be drawn by first converting x and y variables with the cart2pol function.

[x,y] = meshgrid(1:150,1:100);

[th,r] = cart2pol(x 75,y 50); % Convert to polar

% Spiral centered at (75,50) Img = sin(r/3 + th);

imagesc(Img); colormap(hot);

axis image, axis off

12


Example 5: Polynomial interpolation

Given n points x1 , . . . xn and corresponding function values y1 , . . . yn , the coefficients c0 , . . . , cn1 of the interpolating polynomial


can be found by solving


P (x) = cn1 x


n1


+ · · · + c1 x + c0


y

x1 n1 x1 n2 · · · x1 2 x1 1 cn 1 1


n1 x n2 · · · x 2 x


1 c


y


x2 2


2 2


n2


2


. .


. = .


.

. .


.


xn n1 xn n2 · · · xn 2 xn 1 c0 yn

function c = polyint(x,y)

% Given a set of points and function values x and y,

% computes the interpolating polynomial.

x = x(:); % Make sure x and y are both column vectors y = y(:);

n = length(x); % n = Number of points

% Construct the matrix on the lefthandside

xMatrix = repmat(x, 1, n); % Make an n by n matrix with x on every column powMatrix = repmat(n1:1:0, n, 1); % Make another n by n matrix of exponents

A = xMatrix powMatrix; % Compute the powers

c = A\y; % Solve matrix equation for coefficients

The strategy to construct the left-hand side matrix is to first make two n×n matrices of bases and exponents and then put them together using the per element power operator, .^ . The repmat function (“replicate matrix”) is used to make the base matrix xMatrix and the exponent matrix powMatrix.


x(1) x(1) · · · x(1)

x(2) x(2) · · · x(2)


n 1 n 2 · · · 0

n 1 n 2 · · · 0


xMatrix =

.


powMatrix =

. . .


x(n) x(n) · · · x(n)


n 1 n 2 · · · 0


The xMatrix is made by repeating the column vector x over the columns n times. The powMatrix is a row vector with elements n 1, n 2, n 3, . . . , 0 repeated down the rows n times. The two matrices could also have been created with [powMatrix, xMatrix] = meshgrid(n-1:-1:0, x).

The code above is only an example—use the standard polyfit function for serious use.

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

GUI Examples #4: Explore simple string manipulation

October 25, 2009 by Matt Fig · Leave a Comment
Filed under: GUI, Tutorials 
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)

A multi-line editbox is created, and its string is added to a listbox by a pushbutton.

GUIExample4

function [] = GUI_4()
% Demonstrate how to make a multiline editbox.
% Produces a GUI with an editbox on the left and a listbox on the right.
% The user is invited to enter text into the editbox, either hitting return
% at the end of each line or letting it wrap automatically.  When the
% button is pushed, each line of text from the editbox is placed as an
% entry into the listbox.  Notice the difference between how a wrapped line
% is treated and a returned line is treated in the lisbox.
%
%
% Author:  Matt Fig
% Date:  7/15/2009
 
S.fh = figure('units','pixels',...
 'position',[450 450 400 200],...
 'menubar','none',...
 'name','Verify Password.',...
 'resize','off',...
 'numbertitle','off',...
 'name','GUI_4');
S.ed = uicontrol('style','edit',...
 'units','pix',...
 'position',[10 60 190 120],...
 'min',0,'max',2,...  % This is the key to multiline edits.
 'string',{'Enter text here'; 'then push the button.'},...
 'fontweight','bold',...
 'horizontalalign','center',...
 'fontsize',11);
S.ls = uicontrol('style','list',...
 'units','pix',...
 'position',[210 60 180 120],...
 'backgroundcolor','w',...
 'HorizontalAlign','left');
S.pb = uicontrol('style','push',...
 'units','pix',...
 'position',[10 10 380 40],...
 'HorizontalAlign','left',...
 'string','Transfer',...
 'fontsize',14,'fontweight','bold',...
 'callback',{@pb_call,S});
uicontrol(S.ed)   % Give the editbox control. 
 
function [] = pb_call(varargin)
% Callback for edit.
S = varargin{3};
E = get(S.ed,'string')% Get the editbox string
Ec = cellstr(E)% Turn the character array into a cell array.
set(S.ls,'string',Ec)

Download full list of examples

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

MATPOWER: A MATLAB Power System Simulation Package

October 24, 2009 by Luigi Giaccari · Leave a Comment
Filed under: FEM, Mathematics, Mechanics, Optimization, Physics 
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 3.5/10 (2 votes cast)

I just found this package on the web, I am sure many people will find it interesting.

pserclogo

MATPOWER is a package of Matlab M-files for solving power flow and optimal power flow problems. It is intended as a simulation tool for researchers and educators that is easy to use and modify. MATPOWER is designed to give the best performance possible while keeping the code simple to understand and modify. It was initially developed as part
of the PowerWeb project.


Download MATPOWER

You will be asked to fill out a brief form the first time you download from this site.

MATPOWER

(current version is 3.2)

See also Optional Packages below.

Terms of Use

  • MATPOWER is free of charge. Anyone may use it.
  • We make no warranties, express or implied. Specifically, we make no guarantees regarding the correctness MATPOWER’s code or its fitness for any particular purpose.
  • Any publications derived from the use of MATPOWER must acknowledge MATPOWER <http://www.pserc.cornell.edu/matpower/>.
  • Anyone may modify MATPOWER for their own use as long as the original copyright notices remain in place.
  • MATPOWER may not be redistributed without written permission.
  • Modified versions of MATPOWER, or works derived from MATPOWER, may not be distributed without written permission.

Getting Started

System Requirements

To use MATPOWER you will need:

Both are available from The MathWorks.

Note: Although it is likely that most things work fine in MATLAB 5, this is not supported due to limited testing resources. MATPOWER 3.0 required MATLAB 5 and MATPOWER 2.0 and earlier required only MATLAB 4.

Installation

  1. Unzip the downloaded file.
  2. Place files in a location on your Matlab path.
  3. Start up Matlab.

Running MATPOWER

To run a simple Newton power flow on the 9-bus system specified in the file case9.m, with the default algorithm options, at the Matlab prompt, type:

    runpf('case9')

To run an optimal power flow on the 30-bus system whose data is in case30.m, with the default algorithm options, at the Matlab prompt, type:

    runopf('case30')

To run an optimal power flow on the same system, but with the option for MATPOWER to shut down (decommit) expensive generators, type:

    runuopf('case30')

For help on other options and parameters, type:

    help runpf
    help runopf
    help runuopf
    help mpoption
    help caseformat

To run the test suite, place the files in the ‘t’ subdirectory in your Matlab path, and type:

    test_matpower

What’s New in Version 3.2

Below is a summary of the changes since version 3.0.0 of MATPOWER. See the CHANGES file in the docs directory for all the gory details.

New features:

  • AC OPF formulation enhancements
    • new generalized cost model
    • piece-wise linear generator PQ capability curves
    • branch angle difference constraints
    • simplified interface for specifying additional linear constraints
    • option to use current magnitude for line flow limits (Set OPF_FLOW_LIM to 2, fmincopf solver only)
  • AC OPF solvers
    • support for TSPOPF, a new optional package of three OPF solvers,
      implemented as C MEX files, suitable for large scale systems
    • ability to specify initial value and bounds on user variables z
  • New (v. 2) case file format
    • all data in a single struct
    • generator PQ capability curves
    • generator ramp rates
    • branch angle difference limits
  • New function to build DC PDTF matrix (makePTDF.m)
  • Added 5 larger scale (> 2000 bus) cases for Polish system. (Thanks to Roman Korab).
  • Improved identification of binding constraints in printout.
  • Many new tests in test suite.

Bugs fixed:

  • Phase shifters shifted the wrong direction, again (v.2 had it right).
  • Fixed bug in pfsoln.m which caused incorrect value for Qg when Qmin == Qmax for all generators at a bus in power flow solution.

INCOMPATIBLE CHANGES:

  • User supplied A matrix for general linear constraints in OPF no longer includes columns for helper variables for piecewise linear gen costs, and now requires columns for all x (OPF) variables.
  • Changed the sign convention used for phase shifters to be consistent with PTI, PowerWorld, PSAT, etc. E.g. A phase shift of 10 deg now means the voltage at the “to” end is delayed by 10 degrees.
  • Name of option 24 in mpoption changed from OPF_P_LINE_LIM to OPF_FLOW_LIM.

Documentation

There are two primary sources of documentation for MATPOWER.

The User’s Manual is included in the distribution (manual.pdf in docs directory) or it can be downloaded separately from the link above.

Each M-file has its own documentation which can be accessed by typing at the Matlab prompt:

    help <name of M-file>

Documentation for the case data file format can be found by typing:

    help caseformat

If something is still unclear after checking the manual and the
help, the source code is the documentation ;-)


Optional Packages

There are three optional packages to enhance the performance of MATPOWER that may be downloaded separately. MINOPF and BPMPDMEX have more restrictive licenses than MATPOWER. Please see the individual Terms of Use for details.

TSPOPF A package of three AC OPF solvers implemented as C MEX files. Suitable for larger scale problems.
MINOPF A MINOS-based AC OPF solver implemented as a Fortran MEX file.
BPMPD_MEX MEX-file version of the high performance BPMPD interior point LP and QP solver. Speeds up DC and LP-based OPF solvers, and improves robustness of MINOPF.

These packages are distributed separately since each has it’s own license agreement and terms of use.


Mailing List

An e-mail list MATPOWER-L@cornell.edu has been set up
to facilitate discussion of MATPOWER. Only list subscribers are permitted to post to the list.

Feel free to use this list to discuss anything related to MATPOWER, to ask questions about MATPOWER, or to provide feedback to the developers of MATPOWER, such as bug reports, patches or ideas for improvements (though we make no guarantees about if/when they might be included).

Also, if you have any of your own Matlab power systems code that you would like to contribute, feel free to contact us via this list about making it available on the MATPOWER web site.

Joining the list

To join the MATPOWER mailing list, send an e-mail to lyris@cornell.edu with the following line in the body of the message, where “John Doe” is replaced by your real name.

    join MATPOWER-L "John Doe"

Sending mail to the list

To send an e-mail to all of the subscribers of the MATPOWER mailing list, simply address your e-mail to MATPOWER-L@cornell.edu. Only subscribers are permitted to send e-mail to the list.

Leaving the list

You can unsubscribe from the list at any time by sending an e-mail to lyris@cornell.edu with the following line in the body of the message.

    leave MATPOWER-L
VN:F [1.8.1_1037]
Rating: 3.5/10 (2 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Face Recognition Based on Fractional Gaussian Derivatives

October 23, 2009 by Luigi Rosa · Leave a Comment
Filed under: Algorithms, Image processing 
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
.: Click here to download :.

Local photometric descriptors computed for interest regions have proven to be very successful in applications such as wide baseline matching, object recognition, texture recognition, image retrieval, robot localization, video data mining, building panoramas, and recognition of object categories. They are distinctive, robust to occlusion, and do not require segmentation. Recent work has concentrated on making these descriptors invariant to image transformations. The idea is to detect image regions covariant to a class of transformations, which are then used as support regions to compute invariant descriptors.

The fractional gaussian derivative can be computed in a number of ways, one such way is in the frequency domain. Denoting the Fourier transform of the function f(x) as F(w), it is straight-forward to show that the Fourier transform of the nth-order derivative, f(n)(x), is (jw)^n*F(w), for any integer order n. Of course, there is no reason why n must be an integer, n can be any real (or complex) number – hence the fractional derivative.

The code has been tested with AT&T database achieving an excellent recognition rate of 99.60% (40 classes, 5 training images and 5 test images for each class, hence there are 200 training images and 200 test images in total randomly selected and no overlap exists between the training and test images).

Index Terms: Matlab, source, code, face recognition, webcam, local descriptors, web cam, fractional gaussian derivatives, face matching, face identification.

Figure 1. 2D Gaussian and Derivatives

A simple and effective source code for WebCam Face Identification.

Demo code (protected P-files) available for performance evaluation. Matlab Image Processing Toolbox and Matlab Image Acquisition Toolbox are required.
Release
Date
Major features
2.0

2007.09.27

1.0

2007.08.23

  • Face recognition based on fractional gaussian derivatives
  • High recognition rate: 99.40% using AT&T Database
  • Easy and intuitive GUI
  • Command line functions for rapid testing
  • Webcam image acquisition

We recommend to check the secure connection to PayPal, in order to avoid any fraud.
This donation has to be considered an encouragement to improve the code itself.

WebCam Face Identification – Release 1.0 – Click here for your donation. In order to obtain the source code you have to pay a little sum of money: 600 EUROS (less than 840 U.S. Dollars).
Once you have done this, please email us luigi.rosa@tiscali.it
As soon as possible (in a few days) you will receive our new release of WebCam Face Identification.

Alternatively, you can bestow using our banking coordinates:

Name :
Luigi Rosa
Address :
Via Centrale 35 67042 L’Aquila Italy
Bank name:
Poste Italiane
Bank address:
Viale Europa 190 00144 Roma Italy
IBAN (International Bank Account Number) :
IT-50-V-07601-03600-000058177916
BIC (Bank Identifier Code) :
BPPIITRRXXX

The authors have no relationship or partnership with The Mathworks. All the code provided is written in Matlab language (M-files and/or M-functions), with no dll or other protected parts of code (P-files or executables). The code was developed with Matlab 14 SP1. Matlab Image Processing Toolbox and Matlab Image Acquisition Toolbox are required. The code provided has to be considered “as is” and it is without any kind of warranty. The authors deny any kind of warranty concerning the code as well as any kind of responsibility for problems and damages which may be caused by the use of the code itself including all parts of the source code.

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 3% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Next Page »