Posts

FILE PARSING

Image
  NASA THERMODYNAMIC DATA : Thermodynamics is a branch of physics that deals with heat, work, and temperature, and their relation to energy, radiation, and physical properties of matter.  Thermodynamics applies to a wide variety of topics in science and engineering, especially physical chemistry, biochemistry, chemical engineering and mechanical engineering. Some of thermodynamic data were given by NASA,that has been shown here… In this senerio, we just extract the values,which is already written in that particular file and that values used to find some other datas like specific heat,entropy and enthalpy with the help of matlab. Specific heat:  The specific heat capacity of a substance is the heat capacity of a sample of the substance divided by the mass of the sample. Entropy : Entropy is a scientific concept as well as a measurable physical property that is most commonly associated with a state of disorder, randomness, or uncertainty. Enthalpy: Enthalpy, a property of a thermodynamic

GENETIC ALGORITHM

Image
  GENETIC ALGORITHM: Basically,the genetic algorithm is inspired by the natural process that belongs to larger scale of evolutionary algorithm. It used to generate a high quality solution for optimation and search type problem. It relying on biologically operation like mutation,cross over and selection. Generates a population of points at each iteration. The best point in the population approaches an optimal solution. EXAMPLE; Automatically solve suduko puzzle, hyperparameter optimization....etc... SYNTEX:  call the genetic algorithm function ga with the syntax  [x fval] = ga(@fitnessfun, nvars, options)   where , @fitnessfun  is a handle to the fitness function.  nvars  is the number of independent variables for the fitness function.  options  is a structure containing options for the genetic algorithm.   WRITE A FUNCTION CODE: for genetic algorithm,we wrote a function program by this formula as given below, f1x=(sin(5.1*pi*x+0.5))^6; f2y=(sin(5.1*pi*y+0.5))^6; f3x=exp(-4*log(2)*(x-(0.06

CURVE FIT USING MATLAB

Image
  curve fit: It is the process of constructing a curve or a mathematical function,and it has the relationship b/w orginal data set and predicted data set. Basically,the curve fit depends upon the polynomial equ... The polynomial equ are show below: linear equ/first degree polynomial:y=ax+b; quadratic equ/second degree polynomial:y=ax^2+bx+c; cubic equ/third degree polynomial:y=ax^3+bx^2+cx+d; the degree of polynomial can go 4,5 and so on; coading for linear and quadratic equ: clear all close all clc %loading data cp_data=load('data') temp=cp_data(:,1) cp=cp_data(:,2) %curve fit co_eff1=polyfit(temp,cp,3); predicted_cp=polyval(co_eff1,temp) co_eff2=polyfit(temp,cp,1); predicted_cp2=polyval(co_eff2,temp) %compare org fit,predicted fit plot(temp,cp,LineWidth=3); hold on plot(temp,predicted_cp,LineWidth=3) plot(temp,predicted_cp2,LineWidth=3) xlabel('temperature') ylabel('specific heat') legend('original c_p','cubic polynomial','linear polynomia

simple pendulum using matlab

Image
  ORDERLY DEFFRENTIAL EQUATION: In applied engineering and science many physical initial and boundary value problems can be described by ODE. The behavior of many physical problem,particularly those system undergoing time dependent changes can be formulated as ODE. The diff.equ involves one or more physical quantities such as displacement,velocity,temperature etc.. An nth order ODE may be represented as F(x,y,y’,y’’…)=0 SIMPLE PENDULUM: A simple pendulum is a mechanical device,the thin string or massless string is fixed in a supported beam and the other end is fixed to a bob.actually,its act like a newton’s 2 nd law,we give a force to the bob,the pendulum swig due to net force and mass.according to the net force and mass , the bob travels high or low. THE EQU OF A SIMPLE PENDULUM: b-damping co-efficient m-mass of the object g-gravity l-length og the string   First of all,we change the 2 nd order ODE to 1 ST order ODE  According to this formulla,create a function in ma

AIR STANDARD CYCLE

Image
  AIR STANDARD CYCLE:   OTTO CYCLE: Nicholus august otto is invented a working four stroke diesel engine,that’s why the four stroke cycle is also known as otto cycle.later this formula is widely used in petrol engine too. Otto cycle is an idealized thermodynamic cycle that explain about the function of typical spark ignition piston engine.it widely used in automobile engine. In this system describe what happens to mass of air? And how it changes due to pressure,volume,temperature,addition of heat,removal of heat. PROCESSES: Process 0-1 = intake stroke,mass of air is drawn into cylinder at constant pressure. Process 1-2 = isentropic compression stroke,to compress the air/fuel ratio the piston moves BDC(bootom dead center) to TDC(top dead center). Process 2-3 = constant volume heat addition,due to the compression,the air fuel mixture burns rapidly and it will produce massive heat while the piston stay at TDC. Process 3-4 = isentropic expansion,the power, the piston is driven outward by t

2r robotic arm

Image
2R ROBOTIC ARM ABOUT: It is a type of mechanical arm,usually it’s perform a similar function like a human arm.in the 2r robotics arm,the two links and manipulator were connected by the joints and the joints allow to perform either rotational motion or linear displacement.the links of the manipulator can be consider to form a kinematic chain To create a animation using matlab: First of all,we should understand the concept of forward kinematics 2r robotics arm like how it’s works?,what are the material has been used?,how many linkages and joints has been used? Then,we should do analyse mathematically, ¨     Calculate length and position of link1.. ¨     Calculate length and position of link2.. For plotting purpose;we pick some co-ordinates,which refers to forward kinematics robotics arm. Starting orgin x0=0;y0=0 At link 1: x1=l1cos⍬;y1=l1sin⍬ At link 2:x2=x1+l2cos⍬;y2=y2+l2sin⍬ [x0 y0][x1 y1][x2 y2] write a code to create animation link 2r robotic arm: clear all close all clc %

DRAG FORCE

Image
DRAG FORCE   DRAG FORCE: Drag force is a force,which resistance offered by the fluid like air or water.if we consider a car travelling a point A to B,we put a hand outside thorugh the window,then we feel the opposive of air.its known as drag force.   DRAG FORCE EQUATION: When the drag takes place in the presence of air, it is known as aerodynamic drag. When it takes place in water, it is known as hydrodynamic drag.   F D  = ½c_dρAv 2   Where, C_d-Drag co-efficient,which is dimensionless with value,depending upon the shape of object.(c_d=0.33-0.41 for mini cars and c_d=0.31-0.40 for sport cars etc...). ρ  -rho is the density of fluid. V – velocity of the object. A – cross sectional area of object( In automonile 'A' consider as frontal area). UNIT OF DRAG FORCE:NEWTON or N Drag force is propotional to the square of the velocity.if the velocity of speed increases two times,drag force increases four times. EXAMPLE: A car travelling on a road. A bicycle pedalling