Friday, 27 November 2020

Python Program to find out guessed number.

# -*- coding: utf-8 -*-

"""

Created on Thu Nov 26 17:49:38 2020


@author: admin

"""


import random


n = 30;

to_be_guessed = int(n*random.random())+1

guess = 0


while guess != to_be_guessed:

    guess = int(input("New Number: "))

    if guess > 0:

        if guess > to_be_guessed:

            print("Its large...")

        elif guess < to_be_guessed:

            print("Its small...")

    else:

        print("Oops, we lost...")

else:

    print("Congrads..You made it...")


***********************************************************

Tuesday, 22 September 2020

 

Creating a simple HTML for taking Notes


*** BODY OF AN HTML ***

<!DOCTYPE html>

<html>

<body>


</body>

</html>


*** COLOR ***

<h1 style="color: red">Title</h1>


*** FONT SIZE CHANGE ***

<center>

<h2>

<p style="font-family:bahnschrift">

<u><a href="F:\1.Home\PHY"> Details</a></u>

</h2>

</p>

</center>


*** ALIGN TO CENTRE ***

<p style="text-align:center">Center this text!</p>

or

<center> <\center>


*** FONT CHANGE WITH HEADING 2 ***

<center></u><h2><p style="font-family:bahnschrift">Name </h2></u></p></center><br>


*** *** UNDERLINE WITH COLOR ***

<u style="color: red">Question ? </u><br>


*** ADD AN IMAGE or webpage ***

<img src="Image_Name.jpg" alt="Image_Name">

<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">

<embed type="image/jpg" src="pic_trulli.jpg" width="300" height="200">

.......................................................................................

<iframe src="URL" height="200" width="300"></iframe>

<embed type="text/html" src="snippet.html"  width="500" height="200">


<!DOCTYPE html>

<html>

<body>


<h1>The iframe element + CSS</h1>


<p>An iframe with default borders:</p>

<iframe src="/default.asp" width="100%" height="300">

</iframe>


<p>An iframe with a thin black border:</p>

<iframe src="/default.asp" width="100%" height="300" style="border:1px solid black;">

</iframe>


<p>An iframe with no borders:</p>

<iframe src="/default.asp" width="100%" height="300" style="border:none;">

</iframe>


</body>

</html>


.......................................................................................


*** NEXTLINE ***

<br>

.......................................................................................

*** UNDERLINE ***

<hr>


<!DOCTYPE html>

<html>

  <head>

    <title>Title of the document</title>

  </head>

  <body>

    <h1>PDF Example with iframe</h1>

    <iframe src="                             " width="100%" height="500px">

    </iframe>

  </body>

</html>


*** TO CREATE A TABULAR COLUMN IN HTML. ***

<style>

table {

  font-family: bahnschrift;

  border-collapse: collapse;

  width: 50%;

}


td, th {

  border: 1px solid #dddddd;

  text-align: left;

  padding: 8px;

}


</style>

</head>

<body>


<h2>HTML Table</h2>


<table>

  <tr>

    <th>Company</th>

    <th>Contact</th>

    <th>Country</th>

  </tr>

  <tr>

    <td>Samsung</td>

    <td>Employee 1</td>

    <td>Germany</td>

  </tr>

  <tr>

   <td>Intel</td>

   <td>Employee 1</td>

   <td>Sweden</td>

  </tr>

</table>


*** TO CREATE A BOX IN HTML ***

<!DOCTYPE html>

<html>

<head>

<style>

div {

  background-color: white;

  width: 200px;

  border: 1px solid black;

  padding: 50px;

  margin: 10px;

}

</style>

</head>

<body>


<h2>Demonstrating the Box Model</h2>


<p>The CSS box model is essentially a box that wraps around every HTML element.

It consists of: borders, padding, margins, and the actual content.</p>


<div>This text is the content of the box. We have added a 50px padding,

20px margin and a 15px green border. Ut enim ad minim veniam, quis nostrud 

exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore 

eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt 

in culpa qui officia deserunt mollit anim id est laborum.</div>


</body>

</html>


*** CREATING A BULLET LIST ***

<!DOCTYPE html>

<html>

<body>


<h2>An Unordered HTML List</h2>


<ul>

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ul>  


<h2>An Ordered HTML List</h2>


<ol>

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ol> 


</body>

</html>


....................................................


<!DOCTYPE html>

<html>

<body>


<h2>A Description List</h2>


<dl>

  <dt>Coffee</dt>

  <dd>- black hot drink</dd>

  <dt>Milk</dt>

  <dd>- white cold drink</dd>

</dl>


</body>

</html>

....................................................

<!DOCTYPE html>

<html>

<head>

<style>

ul.a {

  list-style-type: circle;

}


ul.b {

  list-style-type: square;

}


ol.c {

  list-style-type: upper-roman;

}


ol.d {

  list-style-type: lower-alpha;

}

</style>

</head>

<body>


<p>Example of unordered lists:</p>

<ul class="a">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Coca Cola</li>

</ul>


<ul class="b">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Coca Cola</li>

</ul>


<p>Example of ordered lists:</p>

<ol class="c">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Coca Cola</li>

</ol>


<ol class="d">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Coca Cola</li>

</ol>


</body>

</html>


Easy list

<ul> </ul>

....................................................

<!DOCTYPE html>

<html>

<head>

<style>

p.ex1 {

  margin: 35px;

}

</style>

</head>

<body>


<h1>The margin Property</h1>


<p>A paragraph with no specified margins.</p>

<p class="ex1">This paragraph has a margin of 35 pixels on all four sides. <br>

A paragraph with no specified margins.</p>


</body>

</html>

....................................................

ADDING A LINK IN HTML

<a href="   ">  </a><br><br>

...............................................................

FONT COLOR CHANGE

<p style="color:red">This is a paragraph.</p>

<p style="color:blue">This is another paragraph.</p>

...............................................................

FONT STYLE

<p style="font-family:bahnschrift"> </p>


CREATING A SIMPLE HTML

<!DOCTYPE html>

<html>

<body>


<head>

<style>

table {

  font-family: bahnschrift;

  border-collapse: collapse;

  width: 70%;

}


td, th {

  border: 1px solid #dddddd;

  text-align: left;

  padding: 8px;

}


table {

  font-family: bahnschrift;

  border-collapse: collapse;

  width: 50%;

}

</style>

</head>



<h3><u>Reading X</u></h3>


<h2><u><center>Test Html </center></u></h2><br>


Contents...<br><br>


<img src="Desktop\yogi_ramsurathkumar.jpg "><br><br>  // Image 


<a href="http://www.byrbmhsr.in/Dr.NNCE/30329_424714456577_2481651_n.jpg">Yogi Ramsurathkumar </a><br><br> // Html link


<A HREF="http://www.example.com/myfile.pdf#page=4">


<table>

  <tr>

    <th>Company</th>

    <th>Contact</th>

    <th>Country</th>

  </tr>

  <tr>

    <td>Apple</td>

    <td>Employee 1</td>

    <td>Germany</td>

  </tr>

  <tr>

   <td>Intel</td>

   <td>Employee 1</td>

   <td>Sweden</td>

  </tr>

</table>


<hr><br>

<b><h3>Questions </h3></b>

<ul>

<li>  </li>

<li>  </li>

<li>  </li>

<li>  </li>

<li>  </li>

</ul>


<hr><br>

<b><h3>References </h3></b>


<hr><br><br>


</body>

</html>

.............................................................................................................................

Greek Alphabets for HtmlChar Name Code (Deci) Description

Α &Alpha; 913 Alpha

Β &Beta; 914 Beta

Γ &Gamma; 915 Gamma

Δ &Delta; 916 Delta

Ε &Epsilon; 917 Epsilon

Ζ &Zeta; 918 Zeta

Η &Eta; 919 Eta

Θ &Theta; 920 Theta

Ι &Iota; 921 Iota

Κ &Kappa; 922 Kappa

Λ &Lambda; 923 Lambda

Μ &Mu; 924 Mu

Ν &Nu; 925 Nu

Ξ &Xi; 926 Xi

Ο &Omicron; 927 Omicron

Π &Pi; 928 Pi

Ρ &Rho; 929 Rho

Σ &Sigma; 931 Sigma

Τ &Tau; 932 Tau

Υ &Upsilon; 933 Upsilon

Φ &Phi; 934 Phi

Χ &Chi; 935 Chi

Ψ &Psi; 936 Psi

Ω &Omega; 937 Omega

α &alpha; 945 alpha

β &beta; 946 beta

γ &gamma; 947 gamma

δ &delta; 948 delta

ε &epsilon; 949 epsilon

ζ &zeta; 950 zeta

η &eta; 951 eta

θ &theta; 952 theta

ι &iota; 953 iota

κ &kappa; 954 kappa

λ &lambda; 955 lambda

μ &mu; 956 mu

ν &nu; 957 nu

ξ &xi; 958 xi

ο &omicron; 959 omicron

π &pi; 960 pi

ρ &rho; 961 rho

ς &sigmaf; 962 sigmaf

σ &sigma; 963 sigma

τ &tau; 964 tau

υ &upsilon; 965 upsilon

φ &phi; 966 phi

χ &chi; 967 chi

ψ &psi; 968 psi

ω &omega; 969 omega

ϑ &thetasym; 977 Theta symbol

ϒ &upsih; 978 Upsilon symbol

ϖ &piv; 982 Pi symbol




Tuesday, 8 September 2020

PUCCH in 5G NR Phy

 

Short PUCCH can be small and large payload size


NR PUCCH Formats



 Short duration - PUCCH format 0 and 2.


Short duration PUCCH format 0 - with small payload size.
Short duration PUCCH format 2 - with large payload size.


Long duration - PUCCH format 1,3 and 4.



1. SHORT DURATION PUCCH
Short duration PUCCH can span 1~2 symbols within a slot and may carry either small (1~2 UCI bits) or large (more than 2 UCI bits) payload size.

1.1 PUCCH Format 0
1. 1~2 symbols in a slot and 1~2 UCI bits. HARQ-ACK or SR bit or both.
2. Two different approaches for design here
a) Demodulation Reference Signal based design.
b) Sequence based structure.


DMRS based design & Sequence based structure



For fading channels - DMRS and sequence based degrades.
Frequency selective based fading with large delay spread - DMRS based sequence
structure degrades more then sequence based structure design. This is due to channel estimation error.
For 2-bit HARQ-ACK - Sequence based outperforms DMRS.
Under High delay spread Sequence Based delivers better BER.
Increase in SCS => Higher delay spread => results in channel estimation error.
In sequence based approach, orthogonal sequences used are robust under high-frequency selectivity.


1.2 PUCCH Format 2

Used to carry more than 2 UCI bits.
a. CSI report + more than 2 HARQ-ACK feedback bits.
Multiple PRB's up to 16 are used.
what is coherent detection here ?
FDM of DMRS and UCI symbols indicates, PF2 is CP-OFDM waveform.
DMRS - comes from pseudo-random - comes from a seed => fun(symbol, slot, configurable ID).
This can facilitate to randomize the inter-cell interference on a symbol level basis for
short PUCCH transmission.


DMRS pattern for PUCCH Format 2




20 bits of payload in PF2 occupies 4 PRB's.


2. LONG DURATION PUCCH

Span for 4~14 symbols within a slot.
May carry 1~2 bits or large payload size,more than 2 bits.

Long PUCCH - small payload size - PF1.
Long PUCCH - large payload size - PF3 or PF4.
The above depends on UE multiplexing capacity.

PF3 - No multiplexing capacity.
PF4 can multiplex up to 4 UE's of the same time-frequency resource (same PRB)
using DFT-OCC (Orthogonal Cover Code).
In long PUCCH formats, DMRS and UCI ---> time division multiplexed
and based on DFT-s-OFDM.
Long duration PUCCH is to enhance coverage for cell edge UE's.


2.1 PUCCH Format 1
NR PF 1 - 4~14 symbols in a slot.
Carries 1~2 UCI bits [ HARQ-ACK bits or SR or both ].
Here in this format - DMRS symbols are formed with low PAPR Computer Generated Sequence
(CGS) with cylic shift in frequency domain and Orthogonal COver Codes (OCC) in time domain.
Modulation - BPSK or QPSK.
OCC is applied in Time Domain.


2.2 Design Approach
1) Extension Method.
2) Puncturing Method.

2.2.1 Extension Method.

Candidate structure for PF1
Length 7 using extension method - Fig 7a - Shortest length of PF1




In Extension method, any length n PF1 (4 ~= n ~= 14) consists of floor of n/2 UCI symbols and
n to floor n/2 DMRS symbols.
DMRS + UCI Symbols - Interleaved in TDM Manner.
DMRS Symbols occupy the even indexed symbols locations within length n.
Any length-n PF1 n greater than 4 can be conceived as an extension of length-4 PFI


2.2.2 Puncturing Method.



In this method, DMRS symbols are bundled together ad punctured into the middle of the length-PF1.
UCI symbols are placed at the beginning and at the end of PUCCH length. Like LTE...
DMRS overhead is 1/2.


2.2 PUCCH Format 3
More than 2 UCI bits.
CSI and more than 2 HARQ-ACK bits.
Large payload - up to 16 PRB's.
DMRS overhead is same as PF2, 1/2.
DMRS => low PAPR sequence - Computer generated sequence in frequency domain.
UCI bits - encoded + scrambled + QPSK modulated + DFT precoded = UCI Symbols.
UCI => pi/2 QPSK is also supported for UE Specific configurable modulation scheme.


PUCCH Format 3 Structure
Same as PF1 and PF3 - spans over 4 to 14 symbols in a slot.

Length 4 PF3 - 1. 
Here there are multiple design options based on the DMSRS symbols and their locations.




Length 5 DMRS - 1 or 2 DMRS symbols.



Length-10 PF3 - can have any number of DMRS symbols less than 5 (2 or 4) for less than 1/2 DMRS overhead.



Sounding Reference Signal in 5G NR

  Sounding Reference Signal in 5G NR