Wednesday, May 26, 2010
Thursday, May 20, 2010
;To enable the bindkey in layout and schematic in Cadence
let( (bindKeyFileList file path saveSkillPath)
bindKeyFileList = '(
;My simulation environment setup
envSetVal("asimenv" "saveDir" 'string "./artist_states")
envSetVal("asimenv.startup" "projectDir" 'string "./simulation")
envSetVal("asimenv.startup" "cds_ade_wftool" 'string "awd")
;To make sure simulator does not save all nodes but selected nodes, otherwise the sim file size is big
envSetVal("spectre.outputs" "save" 'string "selected")
;First row: set the artist_states directory path
;Second row: set project directory path
;Third row: Set AWD as a default waveform viewer
Tuesday, May 18, 2010
Plotyy function is used to perform the task. Besides this, it also shows how to set/configure the 2 y-axes by using "set" function. In this example, it sets the Y limit range, auto Y tick, line style, marker, line width, title.
clc %clear working screen
clear %clear all memory
close %close all figure
format short eng
%format short e %format short g
linewidth=1.5; %set line width of a plot
file = 'fixed_Iden_nonlinear1V_5mA_w10u_2.csv';
temp = load(file, '-ascii'); %load a file with data
%[row,col]=size(temp) ; %find row & col size
ntime = temp(:, 1);
Iden = temp(:, 2);
Av = temp(:, 3);
BW = temp(:, 4);
GBW = temp(:, 5);
Vsw = temp(:, 6);
plotyy(ntime, Av, ntime, BW) %plot with two y axes
[AX,Y1,Y2]=plotyy(ntime, Av, ntime, BW,'plot') ;
%Property_AX=get(AX(1)) %to check property of AX
set(AX(1),'XMinorTick', 'on') %enable minor tick on x-axis
set(AX(1),'YLim',[1.55 1.65]) % Change Y1 axis limit range
set(AX(1),'YTickMode','auto') % Change YTick become auto
set(AX(2),'YTickMode','auto') % Change YTick become auto
set(Y1,'LineStyle','-', 'Marker','o', 'LineWidth', linewidth )
set(Y2,'LineStyle','-', 'Marker','x', 'LineWidth', linewidth )
%set(Y1,'LineStyle','-', 'Marker','o', 'Color','b', 'LineWidth', linewidth ) %set(Y2,'LineStyle','-', 'Marker','x', 'Color','g', 'LineWidth', linewidth )
title('Voltage Gain & Bandwith vs m Ratio');
set(get(AX(1),'Ylabel'),'String','Voltage Gain, A _V (V/V)')
set(get(AX(2),'Ylabel'),'String','Bandwidth, BW (Hz)')
legend( Y1,'A _V', 'Location','Best')
legend( Y2,'Bandwidth', 'Location','SouthEast')
%Plot property put after all plots
title('Gain Bandwidth Product vs m Ratio');
ylabel('Gain-Bandwidth Product (V/V Hz)');
Saturday, May 15, 2010
(source from http://www.harveker.com/)
The textbook definition of “straight” is something that has no bends, angles or curves. Can we apply that same definition to life? Heck no!
There really isn’t such thing as “straight” in the universe. At the core of everything—including us—is energy, and energy doesn’t travel straight. It travels in waves. Imagine throwing a pebble into a lake, watching the ripples gliding across the surface.
Right after you throw your pebble, someone else also tosses a pebble in the same lake, and now the ripples from that pebble collide with the ripples from yours. That’s how everything in this universe works.
People, events, actions and reactions are constantly colliding, creating new pathways, new situations, new circumstances and new actions. The chaos of life makes it almost impossible for anyone to always go “straight” to where they planned.
Some people thrive on chaos and change, but most people don’t. They get frustrated, down, and ready to throw in the towel because they usually have expectations, and these expectations are usually damn near impossible to meet.
We might as well just accept it: the road to success comes with twists, turns, ups, downs, stops and reverses. Once we really understand and accept this, we’re less likely to be deluded into having unrealistic expectations that there’s a straight line to the top. So when we come across bumps, flat tires, and raised bridges along the way, we won’t be so quick to get upset or give up. Getting off track is normal and therefore “perfect.”
You have to expect to spend a great deal of time making mistakes—or if it sounds better—“correcting yourself.” There’s a reason why perfectionists have a hard time being highly successful. Perfectionism is a form of fear, based on fear of failure or the fear of disapproval.
If perfectionists don’t get it exactly right, then they don’t have to finish, follow through, and move on. They get to stay stuck “until its right,” but of course it’ll never be right, so they never have to face the possibility of rejection or disappointment.
We need to consider mistakes—rather than something to be avoided at all costs—instead as “feedback.” Mistakes are our perfectly natural learning curve. They are the feedback we need to get ourselves back on track.
Then we can do the same thing we already know we need to do in order to keep moving forward: take action! Those actions will produce results, sometimes more mistakes. Then we just get that feedback, use it to correct our course again, and then take more action.
This is the non-linear cycle toward success. As long as you use this cycle—and persevere—it’s virtually impossible to fail.
Remember, we’re all ripples in the lake of the universe. You never know how a comment, observation, or minor detail can change the course of your life or another’s!
Now It’s Your Turn!
Wednesday, May 12, 2010
Our Birth is our Opening Balance!
Our Death is our Closing Balance!
Our Prejudiced Views are our Liabilities
Our Creative Ideas are our Assets
Heart is our Current Asset
Soul is our Fixed Asset
Brain is our Fixed Deposit
Thinking is our Current Account
Achievements are our Capital
Character & Morals, our Stock-in-Trade
Friends are our General Reserves
Values & Behaviour are our Goodwill
Patience is our Interest Earned
Love is our Dividend
Children are our Bonus Issues
Education is Brands / Patents
Knowledge is our Investment
Experience is our Premium Account
The Aim is to Tally the Balance Sheet Accurately.
The Goal is to get the Best Presented Accounts Award.
Some very Good and Very bad things …..
The most destructive habit.....................Worry
The greatest Joy......... ......................Giving
The greatest loss..................Loss of self-respect
The most satisfying work.................Helping others
The ugliest personality trait..............Selfishness
The most endangered species........Dedicated leaders
Our greatest natural resource..................Our youth
The greatest 'shot in the arm'.........Encouragement
The greatest problem to overcome...............Fear
The most effective sleeping pill.......Peace of mind
The most crippling failure disease.............Excuses
The most powerful force in life................... Love
The most dangerous act..............................A gossip
The world's most incredible computer.........The brain
The worst thing to be without..................... Hope
The deadliest weapon...... ........ .........The tongue
The two most power-filled words....... .... 'I Can'
The greatest asset....... .......... ......... ...........Faith
The most worthless emotion..................Self- pity
The most beautiful attire........................SMILE!
The most prized possession.................Integrity
The most powerful channel of communication. ……..Prayer
The most contagious spirit................Enthusiasm
Life ends; when you stop Dreaming,
Hope ends; when you stop Believing,
Love ends; when you stop Caring,
And Friendship ends; when you stop Sharing...!!!
Tuesday, May 11, 2010
Ever wondered what your sleeping position says about the kind of person you are? A survey of 1,000 British reveals that the six most common sleeping patterns are indicative of personality types.
Foetus position: A whopping 41% of participants sleep in this curled-up manner. Women are twice as likely to rest like this and it is listed as the most common position. These sleepers are said to have a tough exterior but are still sensitive and may appear to be shy but warm up quickly.
Log position – If you sleep on your side with both arms down, you are a social, easy-going person who is trusting, sometimes to the point of being gullible. The study showed 15% of people sleep like a log.
Yearner position - A close third is the side-lying position with both arms out in front of the body, with 13% of partipants sleeping like this. Yearners are noted to be open-minded and still cynical, suspicious, and stubborn about sticking to decisions once they are made.
Soldier position - These sleepers lie on their backs with arms down and kept close to the body. This 8% study is said to be reserved, quiet, without fuss, and hold themselves and others to a high standard. Soldier sleepers have a higher likelihood for snoring due to the flat-back position, which may not cause them to wake up often but may result in a less restful night’s sleep.
Freefall position - Those people who lie on their bellies with arms under or wrapped around a pillow with head turned to the side, make up 7% of the population studied. Freefallers are brash, outgoing, and are very uncomfortable with criticism.
Starfish position - Sleepers who lie on their backs with arms up near their head or the pillow account for 5% of participants. These people are good listeners, helpful, and are uncomfortable being the center of attention. People who sleep in starfish position are more likely to snore and to suffer from a poor night’s sleep more often.
Thursday, May 06, 2010
Wednesday, May 05, 2010
Tuesday, May 04, 2010
Sunday, May 02, 2010
Here is a simple Matlab code for control theory like bode plot, root locus, and transfer function. You could either use symbolic method, which using 's' as Laplace symbol or directly key in into vector form (easier).
syms s %construct symbolic object
display('Inverse Laplace for F3(s):')
[num,den]=numden(F3); %extract symbolic numerator and denominator
num=sym2poly(num); %form vector for numerator
den=sym2poly(den); %form vector for denominator
Gtf=tf(num,den) %G(s) in polynomial form
Gzpk=zpk(Gtf) %convert G(s) to factored form
rlocus(Gzpk) %root locus plot
%sgrid %turn on grid for damping ratio
%bode(Gzpk) %bode plot
margin(Gzpk) %find and plot phase & gain margin
(20 s + 60) (s + 7)
(s + 5) (s + 2)
s + 8 s + 16
(20 s + 60) (s + 7)
(s + 5) (s + 2) (s + 8 s + 16)
Inverse Laplace for F3(s):
- 80/9 exp(-5 t) + (25/3 t - 10/9) exp(-2 t) + (-15 t + 10) exp(-4 t)
20 s^2 + 200 s + 420
s^5 + 17 s^4 + 112 s^3 + 356 s^2 + 544 s + 320
20 (s+7) (s+3)
(s+5) (s+4)^2 (s+2)^2
the red color indicates display problem when posting them in html (displacement)
Here is the Matlab code for bode plot. It plots out both open loop & close loop response for comparison.
den=poly([0 0 -2.6e6]);
G=tf(num,den) %open loop
T=feedback(G,1); %negative feedback 1 (close loop)
figure %create new figure
hold on %allow overlap